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,
150 RC_SPELLCHECK_CONTINUOUSLY,
153 RC_TEX_ALLOWS_SPACES,
154 RC_TEX_EXPECTS_WINDOWS_PATHS,
162 RC_USE_CONVERTER_CACHE,
169 RC_VIEWDVI_PAPEROPTION,
180 int read(support::FileName const & filename);
182 int read(std::istream &);
188 void write(support::FileName const & filename,
189 bool ignore_system_lyxrc) const;
190 /// write rc. If a specific tag is given, only output that one.
191 void write(std::ostream & os,
192 bool ignore_system_lyxrc,
193 std::string const & tag = std::string()) const;
196 // FIXME unused (was used for xforms. Do we still need this?)
197 //static docstring const getDescription(LyXRCTags);
199 std::string bind_file;
201 std::string def_file;
207 std::string print_command;
209 std::string print_evenpage_flag;
211 std::string print_oddpage_flag;
213 std::string print_pagerange_flag;
215 std::string print_copies_flag;
217 std::string print_collcopies_flag;
219 std::string print_reverse_flag;
221 std::string print_landscape_flag;
223 std::string print_to_printer;
225 bool print_adapt_output;
227 std::string print_to_file;
229 std::string print_file_extension;
231 std::string print_extra_options;
233 std::string print_spool_command;
235 std::string print_spool_printerprefix;
237 std::string print_paper_flag;
239 std::string print_paper_dimension_flag;
241 std::string custom_export_command;
243 std::string custom_export_format;
244 /// option for telling the dvi viewer about the paper size
245 std::string view_dvi_paper_option;
246 /// default paper size for local xdvi/dvips/ghostview/whatever
247 PAPER_SIZE default_papersize;
248 /// command to run chktex incl. options
249 std::string chktex_command;
250 /// command to run bibtex incl. options
251 std::string bibtex_command;
252 /// command to run makeindex incl. options or other index programs
253 std::string index_command;
254 /// command to run makeindex incl. options for nomencl
255 std::string nomencl_command;
257 std::string document_path;
259 std::string example_path;
261 std::string template_path;
263 std::string tempdir_path;
265 std::string thesaurusdir_path;
267 bool auto_region_delete;
268 /// flag telling whether lastfiles should be checked for existance
269 bool auto_reset_options;
271 bool check_lastfiles;
272 /// maximal number of lastfiles
273 unsigned int num_lastfiles;
274 /// whether or not go to saved position when opening a file
275 bool use_lastfilepos;
276 /// load files from last session automatically
278 /// shall a backup file be created
280 /// A directory for storing backup files
281 std::string backupdir_path;
282 /// Whether or not save/restore session information
283 /// like windows position and geometry.
284 bool allow_geometry_session;
285 /// Scrolling speed of the mouse wheel
286 double mouse_wheel_speed;
287 /// Zoom factor for screen fonts
289 /// Screen font sizes in points for each font size
290 std::string font_sizes[10];
291 /// Allow the use of scalable fonts? Default is yes.
292 bool use_scalable_fonts;
298 std::string roman_font_name;
300 std::string sans_font_name;
302 std::string typewriter_font_name;
304 std::string roman_font_foundry;
306 std::string sans_font_foundry;
308 std::string typewriter_font_foundry;
310 unsigned int autosave;
312 unsigned int plaintext_linelen;
313 /// Accept compound words in spellchecker?
314 bool spellchecker_accept_compound;
315 /// Pass input encoding switch to the spellchecker?
316 bool spellchecker_use_input_encoding;
317 /// Use alternate language?
318 bool spellchecker_use_alt_lang;
319 /// Use personal dictionary?
320 bool spellchecker_use_pers_dict;
323 /// Use pixmap cache?
324 bool use_pixmap_cache;
325 /// Use escape chars?
326 bool spellchecker_use_esc_chars;
327 /// Alternate language for spellchecker
328 std::string spellchecker_alt_lang;
329 /// Alternate personal dictionary file for the spellchecker
330 std::string spellchecker_pers_dict;
331 /// Escape characters
332 std::string spellchecker_esc_chars;
333 /// spellcheck continuously?
334 bool spellcheck_continuously;
338 std::string primary_kbmap;
340 std::string secondary_kbmap;
342 std::string lyxpipes;
344 std::string date_insert_format;
346 std::string language_package;
348 bool language_auto_begin;
350 bool language_auto_end;
352 std::string language_command_begin;
354 std::string language_command_end;
356 std::string language_command_local;
358 bool language_global_options;
360 bool language_use_babel;
363 /// bidi cursor movement: true = visual, false = logical
368 bool mark_foreign_language;
370 std::string default_language;
372 std::string gui_language;
374 bool mac_like_word_movement;
376 bool cursor_follows_scrollbar;
378 bool scroll_below_document;
380 enum MacroEditStyle {
381 MACRO_EDIT_INLINE_BOX = 0,
386 MacroEditStyle macro_edit_style;
388 bool dialogs_iconify_with_main;
390 int label_init_length;
392 bool display_graphics;
402 PreviewStatus preview;
404 bool preview_hashed_labels;
406 std::string preview_scale_factor;
408 std::string user_name;
410 std::string user_email;
411 /// True if the TeX engine cannot handle posix paths
412 bool windows_style_tex_paths;
413 /// True if the TeX engine can handle file names containing spaces
414 bool tex_allows_spaces;
415 /** Prepend paths to the PATH environment variable.
416 * The string is input, stored and output in native format.
418 std::string path_prefix;
419 /// Use the cache for file converters?
420 bool use_converter_cache;
421 /// The maximum age of cache files in seconds
422 unsigned int converter_cache_maxage;
423 /// Sort layouts alphabetically
425 /// Group layout by their category
427 /// Toggle toolbars in fullscreen mode?
428 bool full_screen_toolbars;
429 /// Toggle scrollbar in fullscreen mode?
430 bool full_screen_scrollbar;
431 /// Toggle tabbar in fullscreen mode?
432 bool full_screen_tabbar;
433 /// Limit the text width?
434 bool full_screen_limit;
435 /// Width of limited screen (in pixels) in fullscreen mode
436 int full_screen_width;
438 bool completion_cursor_text;
440 double completion_inline_delay;
442 bool completion_inline_math;
444 bool completion_inline_text;
446 int completion_inline_dots;
448 bool autocorrection_math;
450 double completion_popup_delay;
452 bool completion_popup_math;
454 bool completion_popup_text;
456 bool completion_popup_after_complete;
458 bool open_buffers_in_tabs;
462 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
463 * It can be forward-declared and passed as a function argument without
464 * having to expose LyXRC.h.
466 class LyXRC_PreviewStatus {
467 LyXRC::PreviewStatus val_;
469 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
470 operator LyXRC::PreviewStatus() const { return val_; }
477 extern LyXRC system_lyxrc;
479 // used by at least frontends/qt4/GuiPref.cpp
480 const long maxlastfiles = 20;