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
17 #include "bufferparams.h" // Just to get the enum BufferParams::PAPER_SIZE (sic)
18 #include "graphics/GraphicsTypes.h"
20 // #include <boost/utility.hpp>
22 /// This contains the runtime configuration of LyX
23 class LyXRC //: public noncopyable {
24 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
25 // noncopyable again. For now I want to minimise changes. ARRae 20001010
34 RC_PRINTPAGERANGEFLAG,
36 RC_PRINTCOLLCOPIESFLAG,
38 RC_PRINTLANDSCAPEFLAG,
42 RC_PRINTFILEEXTENSION,
43 RC_PRINTEXSTRAOPTIONS,
44 RC_PRINTSPOOL_COMMAND,
45 RC_PRINTSPOOL_PRINTERPREFIX,
47 RC_PRINTPAPERDIMENSIONFLAG,
48 RC_CUSTOM_EXPORT_COMMAND,
49 RC_CUSTOM_EXPORT_FORMAT,
55 RC_SCREEN_FONT_TYPEWRITER,
56 RC_SCREEN_FONT_ROMAN_FOUNDRY,
57 RC_SCREEN_FONT_SANS_FOUNDRY,
58 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
59 RC_SCREEN_FONT_ENCODING,
62 RC_POPUP_FONT_ENCODING,
84 RC_VIEWDVI_PAPEROPTION,
93 RC_SCREEN_FONT_SCALABLE,
98 RC_CURSOR_FOLLOWS_SCROLLBAR,
99 RC_DIALOGS_ICONIFY_WITH_MAIN,
104 RC_MARK_FOREIGN_LANGUAGE,
106 RC_LANGUAGE_AUTO_BEGIN,
107 RC_LANGUAGE_AUTO_END,
108 RC_LANGUAGE_COMMAND_BEGIN,
109 RC_LANGUAGE_COMMAND_END,
110 RC_LANGUAGE_COMMAND_LOCAL,
111 RC_LANGUAGE_GLOBAL_OPTIONS,
112 RC_LANGUAGE_USE_BABEL,
113 RC_DATE_INSERT_FORMAT,
120 RC_LABEL_INIT_LENGTH,
123 RC_PREVIEW_HASHED_LABELS,
124 RC_PREVIEW_SCALE_FACTOR,
139 int read(string const & filename);
141 void readBindFileIfNeeded();
143 void write(string const & filename) const;
147 void output(std::ostream & os) const;
149 static string const getDescription(LyXRCTags);
157 string print_command;
159 string print_evenpage_flag;
161 string print_oddpage_flag;
163 string print_pagerange_flag;
165 string print_copies_flag;
167 string print_collcopies_flag;
169 string print_reverse_flag;
171 string print_landscape_flag;
173 string print_to_printer;
175 bool print_adapt_output;
177 string print_to_file;
179 string print_file_extension;
181 string print_extra_options;
183 string print_spool_command;
185 string print_spool_printerprefix;
187 string print_paper_flag;
189 string print_paper_dimension_flag;
191 string custom_export_command;
193 string custom_export_format;
196 /// postscript interpreter (in general "gs", if it is installed)
198 /// option for telling the dvi viewer about the paper size
199 string view_dvi_paper_option;
200 /// default paper size for local xdvi/dvips/ghostview/whatever
201 BufferParams::PAPER_SIZE default_papersize;
202 /// command to run chktex incl. options
203 string chktex_command;
205 string document_path;
207 string template_path;
213 bool auto_region_delete;
214 /// flag telling whether lastfiles should be checked for existance
215 bool auto_reset_options;
217 bool check_lastfiles;
218 /// filename for lastfiles file
220 /// maximal number of lastfiles
221 unsigned int num_lastfiles;
222 /// shall a backup file be created
224 /// A directory for storing backup files
225 string backupdir_path;
226 /// Zoom factor for screen fonts
228 /// parameter for button_4 and button_5 (scrollwheel)
229 unsigned int wheel_jump;
230 /// Screen font sizes in points for each font size
231 float font_sizes[10];
232 /// Allow the use of scalable fonts? Default is yes.
233 bool use_scalable_fonts;
239 string roman_font_name;
241 string sans_font_name;
243 string typewriter_font_name;
245 string roman_font_foundry;
247 string sans_font_foundry;
249 string typewriter_font_foundry;
251 string popup_bold_font;
253 string popup_normal_font;
276 FontEncoding font_norm_type;
278 void set_font_norm_type();
280 string popup_font_encoding;
282 unsigned int autosave;
284 string ascii_roff_command;
286 unsigned int ascii_linelen;
292 /// Accept compound words in spellchecker?
293 bool isp_accept_compound;
294 /// Pass input encoding switch to ispell?
295 bool isp_use_input_encoding;
296 /// Use alternate language?
297 bool isp_use_alt_lang;
298 /// Use personal dictionary?
299 bool isp_use_pers_dict;
300 /// Use escape chars?
301 bool isp_use_esc_chars;
302 /// Alternate language for ispell
304 /// Alternate personal dictionary file for ispell
305 string isp_pers_dict;
306 /// Escape characters
307 string isp_esc_chars;
311 string primary_kbmap;
313 string secondary_kbmap;
317 string date_insert_format;
319 string language_package;
321 bool language_auto_begin;
323 bool language_auto_end;
325 string language_command_begin;
327 string language_command_end;
329 string language_command_local;
331 bool language_global_options;
333 bool language_use_babel;
339 bool mark_foreign_language;
340 /// Do we have to use a GUI?
343 string default_language;
345 bool cursor_follows_scrollbar;
347 bool dialogs_iconify_with_main;
349 int label_init_length;
351 grfx::DisplayType display_graphics;
357 bool preview_hashed_labels;
359 float preview_scale_factor;
366 /// Is a bind file already (or currently) read?
369 int ReadBindFile(string const & name);
375 extern LyXRC system_lyxrc;