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