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_MENUBAR,
86 RC_FULL_SCREEN_TOOLBARS,
90 RC_INDEX_ALTERNATIVES,
99 RC_LANGUAGE_AUTO_BEGIN,
100 RC_LANGUAGE_AUTO_END,
101 RC_LANGUAGE_COMMAND_BEGIN,
102 RC_LANGUAGE_COMMAND_END,
103 RC_LANGUAGE_COMMAND_LOCAL,
104 RC_LANGUAGE_GLOBAL_OPTIONS,
106 RC_LANGUAGE_USE_BABEL,
110 RC_MARK_FOREIGN_LANGUAGE,
111 RC_MOUSE_WHEEL_SPEED,
117 RC_PREVIEW_HASHED_LABELS,
118 RC_PREVIEW_SCALE_FACTOR,
119 RC_PRINTCOLLCOPIESFLAG,
122 RC_PRINTEVENPAGEFLAG,
123 RC_PRINTEXSTRAOPTIONS,
124 RC_PRINTFILEEXTENSION,
125 RC_PRINTLANDSCAPEFLAG,
127 RC_PRINTPAGERANGEFLAG,
128 RC_PRINTPAPERDIMENSIONFLAG,
131 RC_PRINTSPOOL_COMMAND,
132 RC_PRINTSPOOL_PRINTERPREFIX,
135 RC_PRINT_ADAPTOUTPUT,
139 RC_SCREEN_FONT_ROMAN,
140 RC_SCREEN_FONT_ROMAN_FOUNDRY,
142 RC_SCREEN_FONT_SANS_FOUNDRY,
143 RC_SCREEN_FONT_SCALABLE,
144 RC_SCREEN_FONT_SIZES,
145 RC_SCREEN_FONT_TYPEWRITER,
146 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
148 RC_SCROLL_BELOW_DOCUMENT,
152 RC_OPEN_BUFFERS_IN_TABS,
155 RC_SPELLCHECK_CONTINUOUSLY,
156 RC_SPLITINDEX_COMMAND,
159 RC_TEX_ALLOWS_SPACES,
160 RC_TEX_EXPECTS_WINDOWS_PATHS,
168 RC_USE_CONVERTER_CACHE,
175 RC_VIEWDVI_PAPEROPTION,
186 int read(support::FileName const & filename);
188 int read(std::istream &);
194 void write(support::FileName const & filename,
195 bool ignore_system_lyxrc) const;
196 /// write rc. If a specific tag is given, only output that one.
197 void write(std::ostream & os,
198 bool ignore_system_lyxrc,
199 std::string const & tag = std::string()) const;
202 // FIXME unused (was used for xforms. Do we still need this?)
203 //static docstring const getDescription(LyXRCTags);
205 std::string bind_file;
207 std::string def_file;
213 std::string print_command;
215 std::string print_evenpage_flag;
217 std::string print_oddpage_flag;
219 std::string print_pagerange_flag;
221 std::string print_copies_flag;
223 std::string print_collcopies_flag;
225 std::string print_reverse_flag;
227 std::string print_landscape_flag;
229 std::string print_to_printer;
231 bool print_adapt_output;
233 std::string print_to_file;
235 std::string print_file_extension;
237 std::string print_extra_options;
239 std::string print_spool_command;
241 std::string print_spool_printerprefix;
243 std::string print_paper_flag;
245 std::string print_paper_dimension_flag;
246 /// option for telling the dvi viewer about the paper size
247 std::string view_dvi_paper_option;
248 /// default paper size for local xdvi/dvips/ghostview/whatever
249 PAPER_SIZE default_papersize;
250 /// command to run chktex incl. options
251 std::string chktex_command;
252 /// all available commands to run bibtex incl. options
253 std::vector<std::string> bibtex_alternatives;
254 /// command to run bibtex incl. options
255 std::string bibtex_command;
256 /// command to run japanese bibtex incl. options
257 std::string jbibtex_command;
258 /// all available index commands incl. options
259 std::vector<std::string> index_alternatives;
260 /// command to run makeindex incl. options or other index programs
261 std::string index_command;
262 /// command to run japanese index program incl. options
263 std::string jindex_command;
264 /// command to generate multiple indices
265 std::string splitindex_command;
266 /// command to run makeindex incl. options for nomencl
267 std::string nomencl_command;
269 std::string document_path;
271 std::string example_path;
273 std::string template_path;
275 std::string tempdir_path;
277 std::string thesaurusdir_path;
279 bool auto_region_delete;
280 /// flag telling whether lastfiles should be checked for existance
281 bool auto_reset_options;
283 bool check_lastfiles;
284 /// maximal number of lastfiles
285 unsigned int num_lastfiles;
286 /// whether or not go to saved position when opening a file
287 bool use_lastfilepos;
288 /// load files from last session automatically
290 /// shall a backup file be created
292 /// A directory for storing backup files
293 std::string backupdir_path;
294 /// Whether or not save/restore session information
295 /// like windows position and geometry.
296 bool allow_geometry_session;
297 /// Scrolling speed of the mouse wheel
298 double mouse_wheel_speed;
299 /// Zoom factor for screen fonts
301 /// Screen font sizes in points for each font size
302 std::string font_sizes[10];
303 /// Allow the use of scalable fonts? Default is yes.
304 bool use_scalable_fonts;
310 std::string roman_font_name;
312 std::string sans_font_name;
314 std::string typewriter_font_name;
316 std::string roman_font_foundry;
318 std::string sans_font_foundry;
320 std::string typewriter_font_foundry;
322 unsigned int autosave;
324 unsigned int plaintext_linelen;
325 /// Accept compound words in spellchecker?
326 bool spellchecker_accept_compound;
327 /// Pass input encoding switch to the spellchecker?
328 bool spellchecker_use_input_encoding;
329 /// Use alternate language?
330 bool spellchecker_use_alt_lang;
331 /// Use personal dictionary?
332 bool spellchecker_use_pers_dict;
335 /// Use pixmap cache?
336 bool use_pixmap_cache;
337 /// Use escape chars?
338 bool spellchecker_use_esc_chars;
339 /// Alternate language for spellchecker
340 std::string spellchecker_alt_lang;
341 /// Alternate personal dictionary file for the spellchecker
342 std::string spellchecker_pers_dict;
343 /// Escape characters
344 std::string spellchecker_esc_chars;
345 /// spellcheck continuously?
346 bool spellcheck_continuously;
350 std::string primary_kbmap;
352 std::string secondary_kbmap;
354 std::string lyxpipes;
356 std::string date_insert_format;
358 std::string language_package;
360 bool language_auto_begin;
362 bool language_auto_end;
364 std::string language_command_begin;
366 std::string language_command_end;
368 std::string language_command_local;
370 bool language_global_options;
372 bool language_use_babel;
375 /// bidi cursor movement: true = visual, false = logical
380 bool mark_foreign_language;
382 std::string default_language;
384 std::string gui_language;
386 std::string default_view_format;
388 bool mac_like_word_movement;
390 bool cursor_follows_scrollbar;
392 bool scroll_below_document;
394 enum MacroEditStyle {
395 MACRO_EDIT_INLINE_BOX = 0,
400 MacroEditStyle macro_edit_style;
402 bool dialogs_iconify_with_main;
404 int label_init_length;
406 bool display_graphics;
416 PreviewStatus preview;
418 bool preview_hashed_labels;
420 std::string preview_scale_factor;
422 std::string user_name;
424 std::string user_email;
425 /// True if the TeX engine cannot handle posix paths
426 bool windows_style_tex_paths;
427 /// True if the TeX engine can handle file names containing spaces
428 bool tex_allows_spaces;
429 /** Prepend paths to the PATH environment variable.
430 * The string is input, stored and output in native format.
432 std::string path_prefix;
433 /// Use the cache for file converters?
434 bool use_converter_cache;
435 /// The maximum age of cache files in seconds
436 unsigned int converter_cache_maxage;
437 /// Sort layouts alphabetically
439 /// Group layout by their category
441 /// Toggle toolbars in fullscreen mode?
442 bool full_screen_toolbars;
443 /// Toggle scrollbar in fullscreen mode?
444 bool full_screen_scrollbar;
445 /// Toggle tabbar in fullscreen mode?
446 bool full_screen_tabbar;
447 /// Toggle menubar in fullscreen mode?
448 bool full_screen_menubar;
449 /// Limit the text width?
450 bool full_screen_limit;
451 /// Width of limited screen (in pixels) in fullscreen mode
452 int full_screen_width;
454 bool completion_cursor_text;
456 double completion_inline_delay;
458 bool completion_inline_math;
460 bool completion_inline_text;
462 int completion_inline_dots;
464 bool autocorrection_math;
466 double completion_popup_delay;
468 bool completion_popup_math;
470 bool completion_popup_text;
472 bool completion_popup_after_complete;
474 bool open_buffers_in_tabs;
478 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
479 * It can be forward-declared and passed as a function argument without
480 * having to expose LyXRC.h.
482 class LyXRC_PreviewStatus {
483 LyXRC::PreviewStatus val_;
485 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
486 operator LyXRC::PreviewStatus() const { return val_; }
493 extern LyXRC system_lyxrc;
495 // used by at least frontends/qt4/GuiPref.cpp
496 const long maxlastfiles = 20;