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;
188 /// postscript interpreter (in general "gs", if it is installed)
190 /// option for telling the dvi viewer about the paper size
191 string view_dvi_paper_option;
192 /// default paper size for local xdvi/dvips/ghostview/whatever
193 BufferParams::PAPER_SIZE default_papersize;
194 /// command to run chktex incl. options
195 string chktex_command;
197 string document_path;
199 string template_path;
205 bool auto_region_delete;
206 /// flag telling whether lastfiles should be checked for existance
207 bool auto_reset_options;
209 bool check_lastfiles;
210 /// filename for lastfiles file
212 /// maximal number of lastfiles
213 unsigned int num_lastfiles;
214 /// shall a backup file be created
216 /// A directory for storing backup files
217 string backupdir_path;
218 /// Zoom factor for screen fonts
220 /// parameter for button_4 and button_5 (scrollwheel)
221 unsigned int wheel_jump;
222 /// Screen font sizes in points for each font size
223 float font_sizes[10];
224 /// Allow the use of scalable fonts? Default is yes.
225 bool use_scalable_fonts;
231 string roman_font_name;
233 string sans_font_name;
235 string typewriter_font_name;
237 string roman_font_foundry;
239 string sans_font_foundry;
241 string typewriter_font_foundry;
243 string popup_bold_font;
245 string popup_normal_font;
268 FontEncoding font_norm_type;
270 void set_font_norm_type();
272 string popup_font_encoding;
274 unsigned int autosave;
276 string ascii_roff_command;
278 unsigned int ascii_linelen;
279 /// use library instead of process
283 /// Accept compound words in spellchecker?
284 bool isp_accept_compound;
285 /// Pass input encoding switch to ispell?
286 bool isp_use_input_encoding;
287 /// Use alternate language?
288 bool isp_use_alt_lang;
289 /// Use personal dictionary?
290 bool isp_use_pers_dict;
291 /// Use escape chars?
292 bool isp_use_esc_chars;
293 /// Alternate language for ispell
295 /// Alternate personal dictionary file for ispell
296 string isp_pers_dict;
297 /// Escape characters
298 string isp_esc_chars;
302 string primary_kbmap;
304 string secondary_kbmap;
308 string date_insert_format;
310 string language_package;
312 bool language_auto_begin;
314 bool language_auto_end;
316 string language_command_begin;
318 string language_command_end;
320 string language_command_local;
322 bool language_global_options;
324 bool language_use_babel;
330 bool mark_foreign_language;
332 string default_language;
334 bool cursor_follows_scrollbar;
336 bool dialogs_iconify_with_main;
338 int label_init_length;
340 lyx::graphics::DisplayType display_graphics;
346 bool preview_hashed_labels;
348 float preview_scale_factor;
355 /// Is a bind file already (or currently) read?
358 int ReadBindFile(string const & name);
364 extern LyXRC system_lyxrc;