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_DATE_INSERT_FORMAT,
70 RC_DEFAULT_VIEW_FORMAT,
73 RC_DIALOGS_ICONIFY_WITH_MAIN,
81 RC_FULL_SCREEN_SCROLLBAR,
82 RC_FULL_SCREEN_TABBAR,
83 RC_FULL_SCREEN_TOOLBARS,
95 RC_LANGUAGE_AUTO_BEGIN,
97 RC_LANGUAGE_COMMAND_BEGIN,
98 RC_LANGUAGE_COMMAND_END,
99 RC_LANGUAGE_COMMAND_LOCAL,
100 RC_LANGUAGE_GLOBAL_OPTIONS,
102 RC_LANGUAGE_USE_BABEL,
106 RC_MARK_FOREIGN_LANGUAGE,
107 RC_MOUSE_WHEEL_SPEED,
113 RC_PREVIEW_HASHED_LABELS,
114 RC_PREVIEW_SCALE_FACTOR,
115 RC_PRINTCOLLCOPIESFLAG,
118 RC_PRINTEVENPAGEFLAG,
119 RC_PRINTEXSTRAOPTIONS,
120 RC_PRINTFILEEXTENSION,
121 RC_PRINTLANDSCAPEFLAG,
123 RC_PRINTPAGERANGEFLAG,
124 RC_PRINTPAPERDIMENSIONFLAG,
127 RC_PRINTSPOOL_COMMAND,
128 RC_PRINTSPOOL_PRINTERPREFIX,
131 RC_PRINT_ADAPTOUTPUT,
135 RC_SCREEN_FONT_ROMAN,
136 RC_SCREEN_FONT_ROMAN_FOUNDRY,
138 RC_SCREEN_FONT_SANS_FOUNDRY,
139 RC_SCREEN_FONT_SCALABLE,
140 RC_SCREEN_FONT_SIZES,
141 RC_SCREEN_FONT_TYPEWRITER,
142 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
144 RC_SCROLL_BELOW_DOCUMENT,
148 RC_OPEN_BUFFERS_IN_TABS,
151 RC_SPELLCHECK_CONTINUOUSLY,
152 RC_SPLITINDEX_COMMAND,
155 RC_TEX_ALLOWS_SPACES,
156 RC_TEX_EXPECTS_WINDOWS_PATHS,
164 RC_USE_CONVERTER_CACHE,
171 RC_VIEWDVI_PAPEROPTION,
182 int read(support::FileName const & filename);
184 int read(std::istream &);
190 void write(support::FileName const & filename,
191 bool ignore_system_lyxrc) const;
192 /// write rc. If a specific tag is given, only output that one.
193 void write(std::ostream & os,
194 bool ignore_system_lyxrc,
195 std::string const & tag = std::string()) const;
198 // FIXME unused (was used for xforms. Do we still need this?)
199 //static docstring const getDescription(LyXRCTags);
201 std::string bind_file;
203 std::string def_file;
209 std::string print_command;
211 std::string print_evenpage_flag;
213 std::string print_oddpage_flag;
215 std::string print_pagerange_flag;
217 std::string print_copies_flag;
219 std::string print_collcopies_flag;
221 std::string print_reverse_flag;
223 std::string print_landscape_flag;
225 std::string print_to_printer;
227 bool print_adapt_output;
229 std::string print_to_file;
231 std::string print_file_extension;
233 std::string print_extra_options;
235 std::string print_spool_command;
237 std::string print_spool_printerprefix;
239 std::string print_paper_flag;
241 std::string print_paper_dimension_flag;
242 /// option for telling the dvi viewer about the paper size
243 std::string view_dvi_paper_option;
244 /// default paper size for local xdvi/dvips/ghostview/whatever
245 PAPER_SIZE default_papersize;
246 /// command to run chktex incl. options
247 std::string chktex_command;
248 /// command to run bibtex incl. options
249 std::string bibtex_command;
250 /// command to run japanese bibtex incl. options
251 std::string jbibtex_command;
252 /// command to run makeindex incl. options or other index programs
253 std::string index_command;
254 /// command to run japanese index program incl. options
255 std::string jindex_command;
256 /// command to generate multiple indices
257 std::string splitindex_command;
258 /// command to run makeindex incl. options for nomencl
259 std::string nomencl_command;
261 std::string document_path;
263 std::string example_path;
265 std::string template_path;
267 std::string tempdir_path;
269 std::string thesaurusdir_path;
271 bool auto_region_delete;
272 /// flag telling whether lastfiles should be checked for existance
273 bool auto_reset_options;
275 bool check_lastfiles;
276 /// maximal number of lastfiles
277 unsigned int num_lastfiles;
278 /// whether or not go to saved position when opening a file
279 bool use_lastfilepos;
280 /// load files from last session automatically
282 /// shall a backup file be created
284 /// A directory for storing backup files
285 std::string backupdir_path;
286 /// Whether or not save/restore session information
287 /// like windows position and geometry.
288 bool allow_geometry_session;
289 /// Scrolling speed of the mouse wheel
290 double mouse_wheel_speed;
291 /// Zoom factor for screen fonts
293 /// Screen font sizes in points for each font size
294 std::string font_sizes[10];
295 /// Allow the use of scalable fonts? Default is yes.
296 bool use_scalable_fonts;
302 std::string roman_font_name;
304 std::string sans_font_name;
306 std::string typewriter_font_name;
308 std::string roman_font_foundry;
310 std::string sans_font_foundry;
312 std::string typewriter_font_foundry;
314 unsigned int autosave;
316 unsigned int plaintext_linelen;
317 /// Accept compound words in spellchecker?
318 bool spellchecker_accept_compound;
319 /// Pass input encoding switch to the spellchecker?
320 bool spellchecker_use_input_encoding;
321 /// Use alternate language?
322 bool spellchecker_use_alt_lang;
323 /// Use personal dictionary?
324 bool spellchecker_use_pers_dict;
327 /// Use pixmap cache?
328 bool use_pixmap_cache;
329 /// Use escape chars?
330 bool spellchecker_use_esc_chars;
331 /// Alternate language for spellchecker
332 std::string spellchecker_alt_lang;
333 /// Alternate personal dictionary file for the spellchecker
334 std::string spellchecker_pers_dict;
335 /// Escape characters
336 std::string spellchecker_esc_chars;
337 /// spellcheck continuously?
338 bool spellcheck_continuously;
342 std::string primary_kbmap;
344 std::string secondary_kbmap;
346 std::string lyxpipes;
348 std::string date_insert_format;
350 std::string language_package;
352 bool language_auto_begin;
354 bool language_auto_end;
356 std::string language_command_begin;
358 std::string language_command_end;
360 std::string language_command_local;
362 bool language_global_options;
364 bool language_use_babel;
367 /// bidi cursor movement: true = visual, false = logical
372 bool mark_foreign_language;
374 std::string default_language;
376 std::string gui_language;
378 std::string default_view_format;
380 bool mac_like_word_movement;
382 bool cursor_follows_scrollbar;
384 bool scroll_below_document;
386 enum MacroEditStyle {
387 MACRO_EDIT_INLINE_BOX = 0,
392 MacroEditStyle macro_edit_style;
394 bool dialogs_iconify_with_main;
396 int label_init_length;
398 bool display_graphics;
408 PreviewStatus preview;
410 bool preview_hashed_labels;
412 std::string preview_scale_factor;
414 std::string user_name;
416 std::string user_email;
417 /// True if the TeX engine cannot handle posix paths
418 bool windows_style_tex_paths;
419 /// True if the TeX engine can handle file names containing spaces
420 bool tex_allows_spaces;
421 /** Prepend paths to the PATH environment variable.
422 * The string is input, stored and output in native format.
424 std::string path_prefix;
425 /// Use the cache for file converters?
426 bool use_converter_cache;
427 /// The maximum age of cache files in seconds
428 unsigned int converter_cache_maxage;
429 /// Sort layouts alphabetically
431 /// Group layout by their category
433 /// Toggle toolbars in fullscreen mode?
434 bool full_screen_toolbars;
435 /// Toggle scrollbar in fullscreen mode?
436 bool full_screen_scrollbar;
437 /// Toggle tabbar in fullscreen mode?
438 bool full_screen_tabbar;
439 /// Limit the text width?
440 bool full_screen_limit;
441 /// Width of limited screen (in pixels) in fullscreen mode
442 int full_screen_width;
444 bool completion_cursor_text;
446 double completion_inline_delay;
448 bool completion_inline_math;
450 bool completion_inline_text;
452 int completion_inline_dots;
454 bool autocorrection_math;
456 double completion_popup_delay;
458 bool completion_popup_math;
460 bool completion_popup_text;
462 bool completion_popup_after_complete;
464 bool open_buffers_in_tabs;
468 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
469 * It can be forward-declared and passed as a function argument without
470 * having to expose LyXRC.h.
472 class LyXRC_PreviewStatus {
473 LyXRC::PreviewStatus val_;
475 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
476 operator LyXRC::PreviewStatus() const { return val_; }
483 extern LyXRC system_lyxrc;
485 // used by at least frontends/qt4/GuiPref.cpp
486 const long maxlastfiles = 20;