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
13 #include "bufferparams.h" // Just to get the enum BufferParams::PAPER_SIZE (sic)
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
30 RC_PRINTPAGERANGEFLAG,
32 RC_PRINTCOLLCOPIESFLAG,
34 RC_PRINTLANDSCAPEFLAG,
38 RC_PRINTFILEEXTENSION,
39 RC_PRINTEXSTRAOPTIONS,
40 RC_PRINTSPOOL_COMMAND,
41 RC_PRINTSPOOL_PRINTERPREFIX,
43 RC_PRINTPAPERDIMENSIONFLAG,
44 RC_CUSTOM_EXPORT_COMMAND,
45 RC_CUSTOM_EXPORT_FORMAT,
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,
58 RC_POPUP_FONT_ENCODING,
80 RC_VIEWDVI_PAPEROPTION,
89 RC_SCREEN_FONT_SCALABLE,
94 RC_CURSOR_FOLLOWS_SCROLLBAR,
95 RC_DIALOGS_ICONIFY_WITH_MAIN,
100 RC_MARK_FOREIGN_LANGUAGE,
102 RC_LANGUAGE_AUTO_BEGIN,
103 RC_LANGUAGE_AUTO_END,
104 RC_LANGUAGE_COMMAND_BEGIN,
105 RC_LANGUAGE_COMMAND_END,
106 RC_LANGUAGE_COMMAND_LOCAL,
107 RC_LANGUAGE_GLOBAL_OPTIONS,
108 RC_LANGUAGE_USE_BABEL,
109 RC_DATE_INSERT_FORMAT,
116 RC_LABEL_INIT_LENGTH,
119 RC_PREVIEW_HASHED_LABELS,
120 RC_PREVIEW_SCALE_FACTOR,
133 int read(string const & filename);
135 void readBindFileIfNeeded();
137 void write(string const & filename) const;
141 void output(std::ostream & os) const;
143 static string const getDescription(LyXRCTags);
151 string print_command;
153 string print_evenpage_flag;
155 string print_oddpage_flag;
157 string print_pagerange_flag;
159 string print_copies_flag;
161 string print_collcopies_flag;
163 string print_reverse_flag;
165 string print_landscape_flag;
167 string print_to_printer;
169 bool print_adapt_output;
171 string print_to_file;
173 string print_file_extension;
175 string print_extra_options;
177 string print_spool_command;
179 string print_spool_printerprefix;
181 string print_paper_flag;
183 string print_paper_dimension_flag;
185 string custom_export_command;
187 string custom_export_format;
190 /// postscript interpreter (in general "gs", if it is installed)
192 /// option for telling the dvi viewer about the paper size
193 string view_dvi_paper_option;
194 /// default paper size for local xdvi/dvips/ghostview/whatever
195 BufferParams::PAPER_SIZE default_papersize;
196 /// command to run chktex incl. options
197 string chktex_command;
199 string document_path;
201 string template_path;
207 bool auto_region_delete;
208 /// flag telling whether lastfiles should be checked for existance
209 bool auto_reset_options;
211 bool check_lastfiles;
212 /// filename for lastfiles file
214 /// maximal number of lastfiles
215 unsigned int num_lastfiles;
216 /// shall a backup file be created
218 /// A directory for storing backup files
219 string backupdir_path;
220 /// Zoom factor for screen fonts
222 /// parameter for button_4 and button_5 (scrollwheel)
223 unsigned int wheel_jump;
224 /// Screen font sizes in points for each font size
225 float font_sizes[10];
226 /// Allow the use of scalable fonts? Default is yes.
227 bool use_scalable_fonts;
233 string roman_font_name;
235 string sans_font_name;
237 string typewriter_font_name;
239 string roman_font_foundry;
241 string sans_font_foundry;
243 string typewriter_font_foundry;
245 string popup_bold_font;
247 string popup_normal_font;
270 FontEncoding font_norm_type;
272 void set_font_norm_type();
274 string popup_font_encoding;
276 unsigned int autosave;
278 string ascii_roff_command;
280 unsigned int ascii_linelen;
281 /// use library instead of process
285 /// Accept compound words in spellchecker?
286 bool isp_accept_compound;
287 /// Pass input encoding switch to ispell?
288 bool isp_use_input_encoding;
289 /// Use alternate language?
290 bool isp_use_alt_lang;
291 /// Use personal dictionary?
292 bool isp_use_pers_dict;
293 /// Use escape chars?
294 bool isp_use_esc_chars;
295 /// Alternate language for ispell
297 /// Alternate personal dictionary file for ispell
298 string isp_pers_dict;
299 /// Escape characters
300 string isp_esc_chars;
304 string primary_kbmap;
306 string secondary_kbmap;
310 string date_insert_format;
312 string language_package;
314 bool language_auto_begin;
316 bool language_auto_end;
318 string language_command_begin;
320 string language_command_end;
322 string language_command_local;
324 bool language_global_options;
326 bool language_use_babel;
332 bool mark_foreign_language;
333 /// Do we have to use a GUI?
336 string default_language;
338 bool cursor_follows_scrollbar;
340 bool dialogs_iconify_with_main;
342 int label_init_length;
344 grfx::DisplayType display_graphics;
350 bool preview_hashed_labels;
352 float preview_scale_factor;
359 /// Is a bind file already (or currently) read?
362 int ReadBindFile(string const & name);
368 extern LyXRC system_lyxrc;