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"
31 namespace support { class FileName; }
35 /// This contains the runtime configuration of LyX
40 RC_ACCEPT_COMPOUND = 1,
42 RC_AUTOCORRECTION_MATH,
44 RC_PLAINTEXT_ROFF_COMMAND,
50 RC_BIBTEX_ALTERNATIVES,
55 RC_COMPLETION_CURSOR_TEXT,
56 RC_COMPLETION_INLINE_DELAY,
57 RC_COMPLETION_INLINE_MATH,
58 RC_COMPLETION_INLINE_TEXT,
59 RC_COMPLETION_INLINE_DOTS,
60 RC_COMPLETION_POPUP_DELAY,
61 RC_COMPLETION_POPUP_MATH,
62 RC_COMPLETION_POPUP_TEXT,
63 RC_COMPLETION_POPUP_AFTER_COMPLETE,
65 RC_CONVERTER_CACHE_MAXAGE,
67 RC_CURSOR_FOLLOWS_SCROLLBAR,
68 RC_MAC_LIKE_WORD_MOVEMENT,
69 RC_DATE_INSERT_FORMAT,
72 RC_DEFAULT_VIEW_FORMAT,
75 RC_DIALOGS_ICONIFY_WITH_MAIN,
83 RC_FULL_SCREEN_SCROLLBAR,
84 RC_FULL_SCREEN_TABBAR,
85 RC_FULL_SCREEN_TOOLBARS,
89 RC_INDEX_ALTERNATIVES,
98 RC_LANGUAGE_AUTO_BEGIN,
100 RC_LANGUAGE_COMMAND_BEGIN,
101 RC_LANGUAGE_COMMAND_END,
102 RC_LANGUAGE_COMMAND_LOCAL,
103 RC_LANGUAGE_GLOBAL_OPTIONS,
105 RC_LANGUAGE_USE_BABEL,
109 RC_MARK_FOREIGN_LANGUAGE,
110 RC_MOUSE_WHEEL_SPEED,
116 RC_PREVIEW_HASHED_LABELS,
117 RC_PREVIEW_SCALE_FACTOR,
118 RC_PRINTCOLLCOPIESFLAG,
121 RC_PRINTEVENPAGEFLAG,
122 RC_PRINTEXSTRAOPTIONS,
123 RC_PRINTFILEEXTENSION,
124 RC_PRINTLANDSCAPEFLAG,
126 RC_PRINTPAGERANGEFLAG,
127 RC_PRINTPAPERDIMENSIONFLAG,
130 RC_PRINTSPOOL_COMMAND,
131 RC_PRINTSPOOL_PRINTERPREFIX,
134 RC_PRINT_ADAPTOUTPUT,
138 RC_SCREEN_FONT_ROMAN,
139 RC_SCREEN_FONT_ROMAN_FOUNDRY,
141 RC_SCREEN_FONT_SANS_FOUNDRY,
142 RC_SCREEN_FONT_SCALABLE,
143 RC_SCREEN_FONT_SIZES,
144 RC_SCREEN_FONT_TYPEWRITER,
145 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
147 RC_SCROLL_BELOW_DOCUMENT,
151 RC_OPEN_BUFFERS_IN_TABS,
154 RC_SPELLCHECK_CONTINUOUSLY,
155 RC_SPLITINDEX_COMMAND,
158 RC_TEX_ALLOWS_SPACES,
159 RC_TEX_EXPECTS_WINDOWS_PATHS,
167 RC_USE_CONVERTER_CACHE,
174 RC_VIEWDVI_PAPEROPTION,
185 int read(support::FileName const & filename);
187 int read(std::istream &);
193 void write(support::FileName const & filename,
194 bool ignore_system_lyxrc) const;
195 /// write rc. If a specific tag is given, only output that one.
196 void write(std::ostream & os,
197 bool ignore_system_lyxrc,
198 std::string const & tag = std::string()) const;
201 // FIXME unused (was used for xforms. Do we still need this?)
202 //static docstring const getDescription(LyXRCTags);
204 std::string bind_file;
206 std::string def_file;
212 std::string print_command;
214 std::string print_evenpage_flag;
216 std::string print_oddpage_flag;
218 std::string print_pagerange_flag;
220 std::string print_copies_flag;
222 std::string print_collcopies_flag;
224 std::string print_reverse_flag;
226 std::string print_landscape_flag;
228 std::string print_to_printer;
230 bool print_adapt_output;
232 std::string print_to_file;
234 std::string print_file_extension;
236 std::string print_extra_options;
238 std::string print_spool_command;
240 std::string print_spool_printerprefix;
242 std::string print_paper_flag;
244 std::string print_paper_dimension_flag;
245 /// option for telling the dvi viewer about the paper size
246 std::string view_dvi_paper_option;
247 /// default paper size for local xdvi/dvips/ghostview/whatever
248 PAPER_SIZE default_papersize;
249 /// command to run chktex incl. options
250 std::string chktex_command;
251 /// all available commands to run bibtex incl. options
252 std::vector<std::string> bibtex_alternatives;
253 /// command to run bibtex incl. options
254 std::string bibtex_command;
255 /// command to run japanese bibtex incl. options
256 std::string jbibtex_command;
257 /// all available index commands incl. options
258 std::vector<std::string> index_alternatives;
259 /// command to run makeindex incl. options or other index programs
260 std::string index_command;
261 /// command to run japanese index program incl. options
262 std::string jindex_command;
263 /// command to generate multiple indices
264 std::string splitindex_command;
265 /// command to run makeindex incl. options for nomencl
266 std::string nomencl_command;
268 std::string document_path;
270 std::string example_path;
272 std::string template_path;
274 std::string tempdir_path;
276 std::string thesaurusdir_path;
278 bool auto_region_delete;
279 /// flag telling whether lastfiles should be checked for existance
280 bool auto_reset_options;
282 bool check_lastfiles;
283 /// maximal number of lastfiles
284 unsigned int num_lastfiles;
285 /// whether or not go to saved position when opening a file
286 bool use_lastfilepos;
287 /// load files from last session automatically
289 /// shall a backup file be created
291 /// A directory for storing backup files
292 std::string backupdir_path;
293 /// Whether or not save/restore session information
294 /// like windows position and geometry.
295 bool allow_geometry_session;
296 /// Scrolling speed of the mouse wheel
297 double mouse_wheel_speed;
298 /// Zoom factor for screen fonts
300 /// Screen font sizes in points for each font size
301 std::string font_sizes[10];
302 /// Allow the use of scalable fonts? Default is yes.
303 bool use_scalable_fonts;
309 std::string roman_font_name;
311 std::string sans_font_name;
313 std::string typewriter_font_name;
315 std::string roman_font_foundry;
317 std::string sans_font_foundry;
319 std::string typewriter_font_foundry;
321 unsigned int autosave;
323 unsigned int plaintext_linelen;
324 /// Accept compound words in spellchecker?
325 bool spellchecker_accept_compound;
326 /// Pass input encoding switch to the spellchecker?
327 bool spellchecker_use_input_encoding;
328 /// Use alternate language?
329 bool spellchecker_use_alt_lang;
330 /// Use personal dictionary?
331 bool spellchecker_use_pers_dict;
334 /// Use pixmap cache?
335 bool use_pixmap_cache;
336 /// Use escape chars?
337 bool spellchecker_use_esc_chars;
338 /// Alternate language for spellchecker
339 std::string spellchecker_alt_lang;
340 /// Alternate personal dictionary file for the spellchecker
341 std::string spellchecker_pers_dict;
342 /// Escape characters
343 std::string spellchecker_esc_chars;
344 /// spellcheck continuously?
345 bool spellcheck_continuously;
349 std::string primary_kbmap;
351 std::string secondary_kbmap;
353 std::string lyxpipes;
355 std::string date_insert_format;
357 std::string language_package;
359 bool language_auto_begin;
361 bool language_auto_end;
363 std::string language_command_begin;
365 std::string language_command_end;
367 std::string language_command_local;
369 bool language_global_options;
371 bool language_use_babel;
374 /// bidi cursor movement: true = visual, false = logical
379 bool mark_foreign_language;
381 std::string default_language;
383 std::string gui_language;
385 std::string default_view_format;
387 bool mac_like_word_movement;
389 bool cursor_follows_scrollbar;
391 bool scroll_below_document;
393 enum MacroEditStyle {
394 MACRO_EDIT_INLINE_BOX = 0,
399 MacroEditStyle macro_edit_style;
401 bool dialogs_iconify_with_main;
403 int label_init_length;
405 bool display_graphics;
415 PreviewStatus preview;
417 bool preview_hashed_labels;
419 std::string preview_scale_factor;
421 std::string user_name;
423 std::string user_email;
424 /// True if the TeX engine cannot handle posix paths
425 bool windows_style_tex_paths;
426 /// True if the TeX engine can handle file names containing spaces
427 bool tex_allows_spaces;
428 /** Prepend paths to the PATH environment variable.
429 * The string is input, stored and output in native format.
431 std::string path_prefix;
432 /// Use the cache for file converters?
433 bool use_converter_cache;
434 /// The maximum age of cache files in seconds
435 unsigned int converter_cache_maxage;
436 /// Sort layouts alphabetically
438 /// Group layout by their category
440 /// Toggle toolbars in fullscreen mode?
441 bool full_screen_toolbars;
442 /// Toggle scrollbar in fullscreen mode?
443 bool full_screen_scrollbar;
444 /// Toggle tabbar in fullscreen mode?
445 bool full_screen_tabbar;
446 /// Limit the text width?
447 bool full_screen_limit;
448 /// Width of limited screen (in pixels) in fullscreen mode
449 int full_screen_width;
451 bool completion_cursor_text;
453 double completion_inline_delay;
455 bool completion_inline_math;
457 bool completion_inline_text;
459 int completion_inline_dots;
461 bool autocorrection_math;
463 double completion_popup_delay;
465 bool completion_popup_math;
467 bool completion_popup_text;
469 bool completion_popup_after_complete;
471 bool open_buffers_in_tabs;
475 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
476 * It can be forward-declared and passed as a function argument without
477 * having to expose LyXRC.h.
479 class LyXRC_PreviewStatus {
480 LyXRC::PreviewStatus val_;
482 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
483 operator LyXRC::PreviewStatus() const { return val_; }
490 extern LyXRC system_lyxrc;
492 // used by at least frontends/qt4/GuiPref.cpp
493 const long maxlastfiles = 20;