4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
9 * \author Angus Leeming
11 * \author André Pönitz
15 * Full author contact details are available in file CREDITS.
23 #include "support/strfwd.h"
30 namespace support { class FileName; }
34 /// This contains the runtime configuration of LyX
39 RC_ACCEPT_COMPOUND = 1,
41 RC_AUTOCORRECTION_MATH,
43 RC_PLAINTEXT_ROFF_COMMAND,
53 RC_COMPLETION_CURSOR_TEXT,
54 RC_COMPLETION_INLINE_DELAY,
55 RC_COMPLETION_INLINE_MATH,
56 RC_COMPLETION_INLINE_TEXT,
57 RC_COMPLETION_INLINE_DOTS,
58 RC_COMPLETION_POPUP_DELAY,
59 RC_COMPLETION_POPUP_MATH,
60 RC_COMPLETION_POPUP_TEXT,
61 RC_COMPLETION_POPUP_AFTER_COMPLETE,
63 RC_CONVERTER_CACHE_MAXAGE,
65 RC_CURSOR_FOLLOWS_SCROLLBAR,
66 RC_MAC_LIKE_WORD_MOVEMENT,
67 RC_CUSTOM_EXPORT_COMMAND,
68 RC_CUSTOM_EXPORT_FORMAT,
69 RC_DATE_INSERT_FORMAT,
74 RC_DIALOGS_ICONIFY_WITH_MAIN,
82 RC_FULL_SCREEN_SCROLLBAR,
83 RC_FULL_SCREEN_TABBAR,
84 RC_FULL_SCREEN_TOOLBARS,
94 RC_LANGUAGE_AUTO_BEGIN,
96 RC_LANGUAGE_COMMAND_BEGIN,
97 RC_LANGUAGE_COMMAND_END,
98 RC_LANGUAGE_COMMAND_LOCAL,
99 RC_LANGUAGE_GLOBAL_OPTIONS,
101 RC_LANGUAGE_USE_BABEL,
105 RC_MARK_FOREIGN_LANGUAGE,
106 RC_MOUSE_WHEEL_SPEED,
112 RC_PREVIEW_HASHED_LABELS,
113 RC_PREVIEW_SCALE_FACTOR,
114 RC_PRINTCOLLCOPIESFLAG,
117 RC_PRINTEVENPAGEFLAG,
118 RC_PRINTEXSTRAOPTIONS,
119 RC_PRINTFILEEXTENSION,
120 RC_PRINTLANDSCAPEFLAG,
122 RC_PRINTPAGERANGEFLAG,
123 RC_PRINTPAPERDIMENSIONFLAG,
126 RC_PRINTSPOOL_COMMAND,
127 RC_PRINTSPOOL_PRINTERPREFIX,
130 RC_PRINT_ADAPTOUTPUT,
134 RC_SCREEN_FONT_ROMAN,
135 RC_SCREEN_FONT_ROMAN_FOUNDRY,
137 RC_SCREEN_FONT_SANS_FOUNDRY,
138 RC_SCREEN_FONT_SCALABLE,
139 RC_SCREEN_FONT_SIZES,
140 RC_SCREEN_FONT_TYPEWRITER,
141 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
143 RC_SCROLL_BELOW_DOCUMENT,
147 RC_OPEN_BUFFERS_IN_TABS,
152 RC_TEX_ALLOWS_SPACES,
153 RC_TEX_EXPECTS_WINDOWS_PATHS,
161 RC_USE_CONVERTER_CACHE,
168 RC_VIEWDVI_PAPEROPTION,
179 int read(support::FileName const & filename);
181 int read(std::istream &);
187 void write(support::FileName const & filename,
188 bool ignore_system_lyxrc) const;
189 /// write rc. If a specific tag is given, only output that one.
190 void write(std::ostream & os,
191 bool ignore_system_lyxrc,
192 std::string const & tag = std::string()) const;
195 // FIXME unused (was used for xforms. Do we still need this?)
196 //static docstring const getDescription(LyXRCTags);
198 std::string bind_file;
200 std::string def_file;
206 std::string print_command;
208 std::string print_evenpage_flag;
210 std::string print_oddpage_flag;
212 std::string print_pagerange_flag;
214 std::string print_copies_flag;
216 std::string print_collcopies_flag;
218 std::string print_reverse_flag;
220 std::string print_landscape_flag;
222 std::string print_to_printer;
224 bool print_adapt_output;
226 std::string print_to_file;
228 std::string print_file_extension;
230 std::string print_extra_options;
232 std::string print_spool_command;
234 std::string print_spool_printerprefix;
236 std::string print_paper_flag;
238 std::string print_paper_dimension_flag;
240 std::string custom_export_command;
242 std::string custom_export_format;
243 /// option for telling the dvi viewer about the paper size
244 std::string view_dvi_paper_option;
245 /// default paper size for local xdvi/dvips/ghostview/whatever
246 PAPER_SIZE default_papersize;
247 /// command to run chktex incl. options
248 std::string chktex_command;
249 /// command to run bibtex incl. options
250 std::string bibtex_command;
251 /// command to run makeindex incl. options or other index programs
252 std::string index_command;
253 /// command to run makeindex incl. options for nomencl
254 std::string nomencl_command;
256 std::string document_path;
258 std::string example_path;
260 std::string template_path;
262 std::string tempdir_path;
264 std::string thesaurusdir_path;
266 bool auto_region_delete;
267 /// flag telling whether lastfiles should be checked for existance
268 bool auto_reset_options;
270 bool check_lastfiles;
271 /// maximal number of lastfiles
272 unsigned int num_lastfiles;
273 /// whether or not go to saved position when opening a file
274 bool use_lastfilepos;
275 /// load files from last session automatically
277 /// shall a backup file be created
279 /// A directory for storing backup files
280 std::string backupdir_path;
281 /// Whether or not save/restore session information
282 /// like windows position and geometry.
283 bool allow_geometry_session;
284 /// Scrolling speed of the mouse wheel
285 double mouse_wheel_speed;
286 /// Zoom factor for screen fonts
288 /// Screen font sizes in points for each font size
289 std::string font_sizes[10];
290 /// Allow the use of scalable fonts? Default is yes.
291 bool use_scalable_fonts;
297 std::string roman_font_name;
299 std::string sans_font_name;
301 std::string typewriter_font_name;
303 std::string roman_font_foundry;
305 std::string sans_font_foundry;
307 std::string typewriter_font_foundry;
309 unsigned int autosave;
311 unsigned int plaintext_linelen;
312 /// Accept compound words in spellchecker?
313 bool spellchecker_accept_compound;
314 /// Pass input encoding switch to the spellchecker?
315 bool spellchecker_use_input_encoding;
316 /// Use alternate language?
317 bool spellchecker_use_alt_lang;
318 /// Use personal dictionary?
319 bool spellchecker_use_pers_dict;
322 /// Use pixmap cache?
323 bool use_pixmap_cache;
324 /// Use escape chars?
325 bool spellchecker_use_esc_chars;
326 /// Alternate language for spellchecker
327 std::string spellchecker_alt_lang;
328 /// Alternate personal dictionary file for the spellchecker
329 std::string spellchecker_pers_dict;
330 /// Escape characters
331 std::string spellchecker_esc_chars;
335 std::string primary_kbmap;
337 std::string secondary_kbmap;
339 std::string lyxpipes;
341 std::string date_insert_format;
343 std::string language_package;
345 bool language_auto_begin;
347 bool language_auto_end;
349 std::string language_command_begin;
351 std::string language_command_end;
353 std::string language_command_local;
355 bool language_global_options;
357 bool language_use_babel;
360 /// bidi cursor movement: true = visual, false = logical
365 bool mark_foreign_language;
367 std::string default_language;
369 std::string gui_language;
371 bool mac_like_word_movement;
373 bool cursor_follows_scrollbar;
375 bool scroll_below_document;
377 enum MacroEditStyle {
378 MACRO_EDIT_INLINE_BOX = 0,
383 MacroEditStyle macro_edit_style;
385 bool dialogs_iconify_with_main;
387 int label_init_length;
389 bool display_graphics;
399 PreviewStatus preview;
401 bool preview_hashed_labels;
403 std::string preview_scale_factor;
405 std::string user_name;
407 std::string user_email;
408 /// True if the TeX engine cannot handle posix paths
409 bool windows_style_tex_paths;
410 /// True if the TeX engine can handle file names containing spaces
411 bool tex_allows_spaces;
412 /** Prepend paths to the PATH environment variable.
413 * The string is input, stored and output in native format.
415 std::string path_prefix;
416 /// Use the cache for file converters?
417 bool use_converter_cache;
418 /// The maximum age of cache files in seconds
419 unsigned int converter_cache_maxage;
420 /// Sort layouts alphabetically
422 /// Group layout by their category
424 /// Toggle toolbars in fullscreen mode?
425 bool full_screen_toolbars;
426 /// Toggle scrollbar in fullscreen mode?
427 bool full_screen_scrollbar;
428 /// Toggle tabbar in fullscreen mode?
429 bool full_screen_tabbar;
430 /// Limit the text width?
431 bool full_screen_limit;
432 /// Width of limited screen (in pixels) in fullscreen mode
433 int full_screen_width;
435 bool completion_cursor_text;
437 double completion_inline_delay;
439 bool completion_inline_math;
441 bool completion_inline_text;
443 int completion_inline_dots;
445 bool autocorrection_math;
447 double completion_popup_delay;
449 bool completion_popup_math;
451 bool completion_popup_text;
453 bool completion_popup_after_complete;
455 bool open_buffers_in_tabs;
459 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
460 * It can be forward-declared and passed as a function argument without
461 * having to expose LyXRC.h.
463 class LyXRC_PreviewStatus {
464 LyXRC::PreviewStatus val_;
466 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
467 operator LyXRC::PreviewStatus() const { return val_; }
474 extern LyXRC system_lyxrc;
476 // used by at least frontends/qt4/GuiPref.cpp
477 const long maxlastfiles = 20;