\end_document replaces \the_end.
[lyx.git] / src / lyxrc.h
blob0be918fb900e2b81c67d9f1e8aaa8e1e563d65c0
1 // -*- C++ -*-
2 /**
3 * \file lyxrc.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * Full author contact details are available in file CREDITS
8 */
10 #ifndef LYXRC_H
11 #define LYXRC_H
13 #include "paper.h"
14 #include "graphics/GraphicsTypes.h"
16 // #include <boost/utility.hpp>
18 /// This contains the runtime configuration of LyX
19 class LyXRC //: public noncopyable {
20 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
21 // noncopyable again. For now I want to minimise changes. ARRae 20001010
23 public:
24 enum LyXRCTags {
25 RC_FONT_ENCODING = 1,
26 RC_PRINTER,
27 RC_PRINT_COMMAND,
28 RC_PRINTEVENPAGEFLAG,
29 RC_PRINTODDPAGEFLAG,
30 RC_PRINTPAGERANGEFLAG,
31 RC_PRINTCOPIESFLAG,
32 RC_PRINTCOLLCOPIESFLAG,
33 RC_PRINTREVERSEFLAG,
34 RC_PRINTLANDSCAPEFLAG,
35 RC_PRINTTOPRINTER,
36 RC_PRINT_ADAPTOUTPUT,
37 RC_PRINTTOFILE,
38 RC_PRINTFILEEXTENSION,
39 RC_PRINTEXSTRAOPTIONS,
40 RC_PRINTSPOOL_COMMAND,
41 RC_PRINTSPOOL_PRINTERPREFIX,
42 RC_PRINTPAPERFLAG,
43 RC_PRINTPAPERDIMENSIONFLAG,
44 RC_CUSTOM_EXPORT_COMMAND,
45 RC_CUSTOM_EXPORT_FORMAT,
46 RC_SCREEN_DPI,
47 RC_SCREEN_ZOOM,
48 RC_SCREEN_FONT_SIZES,
49 RC_SCREEN_FONT_ROMAN,
50 RC_SCREEN_FONT_SANS,
51 RC_SCREEN_FONT_TYPEWRITER,
52 RC_SCREEN_FONT_ROMAN_FOUNDRY,
53 RC_SCREEN_FONT_SANS_FOUNDRY,
54 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
55 RC_SCREEN_FONT_ENCODING,
56 RC_POPUP_BOLD_FONT,
57 RC_POPUP_NORMAL_FONT,
58 RC_POPUP_FONT_ENCODING,
59 RC_SET_COLOR,
60 RC_AUTOSAVE,
61 RC_DOCUMENTPATH,
62 RC_TEMPLATEPATH,
63 RC_TEMPDIRPATH,
64 RC_USETEMPDIR,
65 RC_LASTFILES,
66 RC_AUTOREGIONDELETE,
67 RC_AUTORESET_OPTIONS,
68 RC_SERVERPIPE,
69 RC_INPUT,
70 RC_BINDFILE,
71 RC_UIFILE,
72 RC_KBMAP,
73 RC_KBMAP_PRIMARY,
74 RC_KBMAP_SECONDARY,
75 RC_ASCIIROFF_COMMAND,
76 RC_ASCII_LINELEN,
77 RC_NUMLASTFILES,
78 RC_CHECKLASTFILES,
79 RC_VIEWDVI_PAPEROPTION,
80 RC_DEFAULT_PAPERSIZE,
81 RC_PS_COMMAND,
82 RC_ACCEPT_COMPOUND,
83 RC_SPELL_COMMAND,
84 RC_USE_INP_ENC,
85 RC_USE_ALT_LANG,
86 RC_USE_PERS_DICT,
87 RC_USE_ESC_CHARS,
88 RC_SCREEN_FONT_SCALABLE,
89 RC_ALT_LANG,
90 RC_PERS_DICT,
91 RC_ESC_CHARS,
92 RC_CHKTEX_COMMAND,
93 RC_CURSOR_FOLLOWS_SCROLLBAR,
94 RC_DIALOGS_ICONIFY_WITH_MAIN,
95 RC_MAKE_BACKUP,
96 RC_BACKUPDIR_PATH,
97 RC_RTL_SUPPORT,
98 RC_AUTO_NUMBER,
99 RC_MARK_FOREIGN_LANGUAGE,
100 RC_LANGUAGE_PACKAGE,
101 RC_LANGUAGE_AUTO_BEGIN,
102 RC_LANGUAGE_AUTO_END,
103 RC_LANGUAGE_COMMAND_BEGIN,
104 RC_LANGUAGE_COMMAND_END,
105 RC_LANGUAGE_COMMAND_LOCAL,
106 RC_LANGUAGE_GLOBAL_OPTIONS,
107 RC_LANGUAGE_USE_BABEL,
108 RC_DATE_INSERT_FORMAT,
109 RC_SHOW_BANNER,
110 RC_WHEEL_JUMP,
111 RC_CONVERTER,
112 RC_VIEWER,
113 RC_FORMAT,
114 RC_DEFAULT_LANGUAGE,
115 RC_LABEL_INIT_LENGTH,
116 RC_DISPLAY_GRAPHICS,
117 RC_PREVIEW,
118 RC_PREVIEW_HASHED_LABELS,
119 RC_PREVIEW_SCALE_FACTOR,
120 RC_USE_SPELL_LIB,
121 RC_USER_NAME,
122 RC_USER_EMAIL,
123 RC_LAST
128 LyXRC();
130 void setDefaults();
132 int read(string const & filename);
134 void write(string const & filename) const;
136 void print() const;
138 void output(std::ostream & os) const;
140 static string const getDescription(LyXRCTags);
142 string bind_file;
144 string ui_file;
146 string printer;
148 string print_command;
150 string print_evenpage_flag;
152 string print_oddpage_flag;
154 string print_pagerange_flag;
156 string print_copies_flag;
158 string print_collcopies_flag;
160 string print_reverse_flag;
162 string print_landscape_flag;
164 string print_to_printer;
166 bool print_adapt_output;
168 string print_to_file;
170 string print_file_extension;
172 string print_extra_options;
174 string print_spool_command;
176 string print_spool_printerprefix;
178 string print_paper_flag;
180 string print_paper_dimension_flag;
182 string custom_export_command;
184 string custom_export_format;
185 /// postscript interpreter (in general "gs", if it is installed)
186 string ps_command;
187 /// option for telling the dvi viewer about the paper size
188 string view_dvi_paper_option;
189 /// default paper size for local xdvi/dvips/ghostview/whatever
190 PAPER_SIZE default_papersize;
191 /// command to run chktex incl. options
192 string chktex_command;
194 string document_path;
196 string template_path;
198 string tempdir_path;
200 bool use_tempdir;
202 bool auto_region_delete;
203 /// flag telling whether lastfiles should be checked for existance
204 bool auto_reset_options;
206 bool check_lastfiles;
207 /// filename for lastfiles file
208 string lastfiles;
209 /// maximal number of lastfiles
210 unsigned int num_lastfiles;
211 /// shall a backup file be created
212 bool make_backup;
213 /// A directory for storing backup files
214 string backupdir_path;
215 /// Zoom factor for screen fonts
216 unsigned int zoom;
217 /// parameter for button_4 and button_5 (scrollwheel)
218 unsigned int wheel_jump;
219 /// Screen font sizes in points for each font size
220 float font_sizes[10];
221 /// Allow the use of scalable fonts? Default is yes.
222 bool use_scalable_fonts;
223 /// DPI of monitor
224 float dpi;
226 string fontenc;
228 string roman_font_name;
230 string sans_font_name;
232 string typewriter_font_name;
234 string roman_font_foundry;
236 string sans_font_foundry;
238 string typewriter_font_foundry;
240 string popup_bold_font;
242 string popup_normal_font;
244 string font_norm;
246 enum FontEncoding {
248 ISO_10646_1,
250 ISO_8859_1,
252 ISO_8859_3,
254 ISO_8859_4,
256 ISO_8859_6_8,
258 ISO_8859_9,
260 ISO_8859_15,
262 OTHER_ENCODING
265 FontEncoding font_norm_type;
267 void set_font_norm_type();
269 string popup_font_encoding;
271 unsigned int autosave;
273 string ascii_roff_command;
275 unsigned int ascii_linelen;
276 /// use library instead of process
277 bool use_spell_lib;
278 /// Ispell command
279 string isp_command;
280 /// Accept compound words in spellchecker?
281 bool isp_accept_compound;
282 /// Pass input encoding switch to ispell?
283 bool isp_use_input_encoding;
284 /// Use alternate language?
285 bool isp_use_alt_lang;
286 /// Use personal dictionary?
287 bool isp_use_pers_dict;
288 /// Use escape chars?
289 bool isp_use_esc_chars;
290 /// Alternate language for ispell
291 string isp_alt_lang;
292 /// Alternate personal dictionary file for ispell
293 string isp_pers_dict;
294 /// Escape characters
295 string isp_esc_chars;
297 bool use_kbmap;
299 string primary_kbmap;
301 string secondary_kbmap;
303 string lyxpipes;
305 string date_insert_format;
307 string language_package;
309 bool language_auto_begin;
311 bool language_auto_end;
313 string language_command_begin;
315 string language_command_end;
317 string language_command_local;
319 bool language_global_options;
321 bool language_use_babel;
323 bool rtl_support;
325 bool auto_number;
327 bool mark_foreign_language;
329 string default_language;
331 bool cursor_follows_scrollbar;
333 bool dialogs_iconify_with_main;
335 int label_init_length;
337 lyx::graphics::DisplayType display_graphics;
339 bool show_banner;
341 bool preview;
343 bool preview_hashed_labels;
345 float preview_scale_factor;
346 /// user name
347 string user_name;
348 /// user email
349 string user_email;
353 extern LyXRC lyxrc;
355 extern LyXRC system_lyxrc;
356 #endif