2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
19 #include "bufferparams.h" // Just to get the enum BufferParams::PAPER_SIZE (sic)
20 #include "graphics/GraphicsTypes.h"
22 // #include <boost/utility.hpp>
24 /// This contains the runtime configuration of LyX
25 class LyXRC //: public noncopyable {
26 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
27 // noncopyable again. For now I want to minimise changes. ARRae 20001010
36 RC_PRINTPAGERANGEFLAG,
38 RC_PRINTCOLLCOPIESFLAG,
40 RC_PRINTLANDSCAPEFLAG,
44 RC_PRINTFILEEXTENSION,
45 RC_PRINTEXSTRAOPTIONS,
46 RC_PRINTSPOOL_COMMAND,
47 RC_PRINTSPOOL_PRINTERPREFIX,
49 RC_PRINTPAPERDIMENSIONFLAG,
50 RC_CUSTOM_EXPORT_COMMAND,
51 RC_CUSTOM_EXPORT_FORMAT,
57 RC_SCREEN_FONT_TYPEWRITER,
58 RC_SCREEN_FONT_ROMAN_FOUNDRY,
59 RC_SCREEN_FONT_SANS_FOUNDRY,
60 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
61 RC_SCREEN_FONT_ENCODING,
64 RC_POPUP_FONT_ENCODING,
75 RC_OVERRIDE_X_DEADKEYS,
87 RC_VIEWDVI_PAPEROPTION,
96 RC_SCREEN_FONT_SCALABLE,
101 RC_CURSOR_FOLLOWS_SCROLLBAR,
102 RC_DIALOGS_ICONIFY_WITH_MAIN,
107 RC_MARK_FOREIGN_LANGUAGE,
109 RC_LANGUAGE_AUTO_BEGIN,
110 RC_LANGUAGE_AUTO_END,
111 RC_LANGUAGE_COMMAND_BEGIN,
112 RC_LANGUAGE_COMMAND_END,
113 RC_LANGUAGE_COMMAND_LOCAL,
114 RC_LANGUAGE_GLOBAL_OPTIONS,
115 RC_LANGUAGE_USE_BABEL,
116 RC_DATE_INSERT_FORMAT,
123 RC_LABEL_INIT_LENGTH,
126 RC_PREVIEW_HASHED_LABELS,
127 RC_PREVIEW_SCALE_FACTOR,
140 int read(string const & filename);
142 void readBindFileIfNeeded();
144 void write(string const & filename) const;
148 void output(std::ostream & os) const;
150 static string const getDescription(LyXRCTags);
158 string print_command;
160 string print_evenpage_flag;
162 string print_oddpage_flag;
164 string print_pagerange_flag;
166 string print_copies_flag;
168 string print_collcopies_flag;
170 string print_reverse_flag;
172 string print_landscape_flag;
174 string print_to_printer;
176 bool print_adapt_output;
178 string print_to_file;
180 string print_file_extension;
182 string print_extra_options;
184 string print_spool_command;
186 string print_spool_printerprefix;
188 string print_paper_flag;
190 string print_paper_dimension_flag;
192 string custom_export_command;
194 string custom_export_format;
197 /// postscript interpreter (in general "gs", if it is installed)
199 /// option for telling the dvi viewer about the paper size
200 string view_dvi_paper_option;
201 /// default paper size for local xdvi/dvips/ghostview/whatever
202 BufferParams::PAPER_SIZE default_papersize;
203 /// command to run chktex incl. options
204 string chktex_command;
206 string document_path;
208 string template_path;
214 bool auto_region_delete;
215 /// flag telling whether lastfiles should be checked for existance
216 bool auto_reset_options;
218 bool check_lastfiles;
219 /// filename for lastfiles file
221 /// maximal number of lastfiles
222 unsigned int num_lastfiles;
223 /// shall a backup file be created
225 /// A directory for storing backup files
226 string backupdir_path;
227 /// Zoom factor for screen fonts
229 /// parameter for button_4 and button_5 (scrollwheel)
230 unsigned int wheel_jump;
231 /// Screen font sizes in points for each font size
232 float font_sizes[10];
233 /// Allow the use of scalable fonts? Default is yes.
234 bool use_scalable_fonts;
237 /// Whether lyx should handle deadkeys by itself
238 bool override_x_deadkeys;
242 string roman_font_name;
244 string sans_font_name;
246 string typewriter_font_name;
248 string roman_font_foundry;
250 string sans_font_foundry;
252 string typewriter_font_foundry;
254 string popup_bold_font;
256 string popup_normal_font;
279 FontEncoding font_norm_type;
281 void set_font_norm_type();
283 string popup_font_encoding;
285 unsigned int autosave;
287 string ascii_roff_command;
289 unsigned int ascii_linelen;
295 /// Accept compound words in spellchecker?
296 bool isp_accept_compound;
297 /// Pass input encoding switch to ispell?
298 bool isp_use_input_encoding;
299 /// Use alternate language?
300 bool isp_use_alt_lang;
301 /// Use personal dictionary?
302 bool isp_use_pers_dict;
303 /// Use escape chars?
304 bool isp_use_esc_chars;
305 /// Alternate language for ispell
307 /// Alternate personal dictionary file for ispell
308 string isp_pers_dict;
309 /// Escape characters
310 string isp_esc_chars;
314 string primary_kbmap;
316 string secondary_kbmap;
320 string date_insert_format;
322 string language_package;
324 bool language_auto_begin;
326 bool language_auto_end;
328 string language_command_begin;
330 string language_command_end;
332 string language_command_local;
334 bool language_global_options;
336 bool language_use_babel;
342 bool mark_foreign_language;
343 /// Do we have to use a GUI?
346 string default_language;
348 bool cursor_follows_scrollbar;
350 bool dialogs_iconify_with_main;
352 int label_init_length;
354 grfx::DisplayType display_graphics;
360 bool preview_hashed_labels;
362 float preview_scale_factor;
365 /// Is a bind file already (or currently) read?
368 int ReadBindFile(string const & name);
374 extern LyXRC system_lyxrc;