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,
42 RC_PLAINTEXT_ROFF_COMMAND,
52 RC_COMPLETION_CURSOR_TEXT,
53 RC_COMPLETION_INLINE_DELAY,
54 RC_COMPLETION_INLINE_MATH,
55 RC_COMPLETION_INLINE_TEXT,
56 RC_COMPLETION_INLINE_DOTS,
57 RC_COMPLETION_POPUP_DELAY,
58 RC_COMPLETION_POPUP_MATH,
59 RC_COMPLETION_POPUP_TEXT,
60 RC_COMPLETION_POPUP_AFTER_COMPLETE,
62 RC_CONVERTER_CACHE_MAXAGE,
64 RC_CURSOR_FOLLOWS_SCROLLBAR,
65 RC_MAC_LIKE_WORD_MOVEMENT,
66 RC_CUSTOM_EXPORT_COMMAND,
67 RC_CUSTOM_EXPORT_FORMAT,
68 RC_DATE_INSERT_FORMAT,
73 RC_DIALOGS_ICONIFY_WITH_MAIN,
81 RC_FULL_SCREEN_SCROLLBAR,
82 RC_FULL_SCREEN_TABBAR,
83 RC_FULL_SCREEN_TOOLBARS,
93 RC_LANGUAGE_AUTO_BEGIN,
95 RC_LANGUAGE_COMMAND_BEGIN,
96 RC_LANGUAGE_COMMAND_END,
97 RC_LANGUAGE_COMMAND_LOCAL,
98 RC_LANGUAGE_GLOBAL_OPTIONS,
100 RC_LANGUAGE_USE_BABEL,
104 RC_MARK_FOREIGN_LANGUAGE,
105 RC_MOUSE_WHEEL_SPEED,
111 RC_PREVIEW_HASHED_LABELS,
112 RC_PREVIEW_SCALE_FACTOR,
113 RC_PRINTCOLLCOPIESFLAG,
116 RC_PRINTEVENPAGEFLAG,
117 RC_PRINTEXSTRAOPTIONS,
118 RC_PRINTFILEEXTENSION,
119 RC_PRINTLANDSCAPEFLAG,
121 RC_PRINTPAGERANGEFLAG,
122 RC_PRINTPAPERDIMENSIONFLAG,
125 RC_PRINTSPOOL_COMMAND,
126 RC_PRINTSPOOL_PRINTERPREFIX,
129 RC_PRINT_ADAPTOUTPUT,
133 RC_SCREEN_FONT_ROMAN,
134 RC_SCREEN_FONT_ROMAN_FOUNDRY,
136 RC_SCREEN_FONT_SANS_FOUNDRY,
137 RC_SCREEN_FONT_SCALABLE,
138 RC_SCREEN_FONT_SIZES,
139 RC_SCREEN_FONT_TYPEWRITER,
140 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
145 RC_OPEN_BUFFERS_IN_TABS,
150 RC_TEX_ALLOWS_SPACES,
151 RC_TEX_EXPECTS_WINDOWS_PATHS,
159 RC_USE_CONVERTER_CACHE,
166 RC_VIEWDVI_PAPEROPTION,
177 int read(support::FileName const & filename);
179 int read(std::istream &);
185 void write(support::FileName const & filename,
186 bool ignore_system_lyxrc) const;
187 /// write rc. If a specific tag is given, only output that one.
188 void write(std::ostream & os,
189 bool ignore_system_lyxrc,
190 std::string const & tag = std::string()) const;
193 // FIXME unused (was used for xforms. Do we still need this?)
194 //static docstring const getDescription(LyXRCTags);
196 std::string bind_file;
198 std::string def_file;
204 std::string print_command;
206 std::string print_evenpage_flag;
208 std::string print_oddpage_flag;
210 std::string print_pagerange_flag;
212 std::string print_copies_flag;
214 std::string print_collcopies_flag;
216 std::string print_reverse_flag;
218 std::string print_landscape_flag;
220 std::string print_to_printer;
222 bool print_adapt_output;
224 std::string print_to_file;
226 std::string print_file_extension;
228 std::string print_extra_options;
230 std::string print_spool_command;
232 std::string print_spool_printerprefix;
234 std::string print_paper_flag;
236 std::string print_paper_dimension_flag;
238 std::string custom_export_command;
240 std::string custom_export_format;
241 /// option for telling the dvi viewer about the paper size
242 std::string view_dvi_paper_option;
243 /// default paper size for local xdvi/dvips/ghostview/whatever
244 PAPER_SIZE default_papersize;
245 /// command to run chktex incl. options
246 std::string chktex_command;
247 /// command to run bibtex incl. options
248 std::string bibtex_command;
249 /// command to run makeindex incl. options or other index programs
250 std::string index_command;
251 /// command to run makeindex incl. options for nomencl
252 std::string nomencl_command;
254 std::string document_path;
256 std::string example_path;
258 std::string template_path;
260 std::string tempdir_path;
262 std::string thesaurusdir_path;
264 bool auto_region_delete;
265 /// flag telling whether lastfiles should be checked for existance
266 bool auto_reset_options;
268 bool check_lastfiles;
269 /// maximal number of lastfiles
270 unsigned int num_lastfiles;
271 /// whether or not go to saved position when opening a file
272 bool use_lastfilepos;
273 /// load files from last session automatically
275 /// shall a backup file be created
277 /// A directory for storing backup files
278 std::string backupdir_path;
279 /// Whether or not save/restore session information
280 /// like windows position and geometry.
281 bool allow_geometry_session;
282 /// Scrolling speed of the mouse wheel
283 double mouse_wheel_speed;
284 /// Zoom factor for screen fonts
286 /// Screen font sizes in points for each font size
287 std::string font_sizes[10];
288 /// Allow the use of scalable fonts? Default is yes.
289 bool use_scalable_fonts;
295 std::string roman_font_name;
297 std::string sans_font_name;
299 std::string typewriter_font_name;
301 std::string roman_font_foundry;
303 std::string sans_font_foundry;
305 std::string typewriter_font_foundry;
307 unsigned int autosave;
309 unsigned int plaintext_linelen;
310 /// Accept compound words in spellchecker?
311 bool spellchecker_accept_compound;
312 /// Pass input encoding switch to the spellchecker?
313 bool spellchecker_use_input_encoding;
314 /// Use alternate language?
315 bool spellchecker_use_alt_lang;
316 /// Use personal dictionary?
317 bool spellchecker_use_pers_dict;
320 /// Use pixmap cache?
321 bool use_pixmap_cache;
322 /// Use escape chars?
323 bool spellchecker_use_esc_chars;
324 /// Alternate language for ispell
325 std::string spellchecker_alt_lang;
326 /// Alternate personal dictionary file for the spellchecker
327 std::string spellchecker_pers_dict;
328 /// Escape characters
329 std::string spellchecker_esc_chars;
333 std::string primary_kbmap;
335 std::string secondary_kbmap;
337 std::string lyxpipes;
339 std::string date_insert_format;
341 std::string language_package;
343 bool language_auto_begin;
345 bool language_auto_end;
347 std::string language_command_begin;
349 std::string language_command_end;
351 std::string language_command_local;
353 bool language_global_options;
355 bool language_use_babel;
358 /// bidi cursor movement: true = visual, false = logical
363 bool mark_foreign_language;
365 std::string default_language;
367 std::string gui_language;
369 bool mac_like_word_movement;
371 bool cursor_follows_scrollbar;
373 enum MacroEditStyle {
374 MACRO_EDIT_INLINE_BOX = 0,
379 MacroEditStyle macro_edit_style;
381 bool dialogs_iconify_with_main;
383 int label_init_length;
385 bool display_graphics;
395 PreviewStatus preview;
397 bool preview_hashed_labels;
399 std::string preview_scale_factor;
401 std::string user_name;
403 std::string user_email;
404 /// True if the TeX engine cannot handle posix paths
405 bool windows_style_tex_paths;
406 /// True if the TeX engine can handle file names containing spaces
407 bool tex_allows_spaces;
408 /** Prepend paths to the PATH environment variable.
409 * The string is input, stored and output in native format.
411 std::string path_prefix;
412 /// Use the cache for file converters?
413 bool use_converter_cache;
414 /// The maximum age of cache files in seconds
415 unsigned int converter_cache_maxage;
416 /// Sort layouts alphabetically
418 /// Group layout by their category
420 /// Toggle toolbars in fullscreen mode?
421 bool full_screen_toolbars;
422 /// Toggle scrollbar in fullscreen mode?
423 bool full_screen_scrollbar;
424 /// Toggle tabbar in fullscreen mode?
425 bool full_screen_tabbar;
426 /// Limit the text width?
427 bool full_screen_limit;
428 /// Width of limited screen (in pixels) in fullscreen mode
429 int full_screen_width;
431 bool completion_cursor_text;
433 double completion_inline_delay;
435 bool completion_inline_math;
437 bool completion_inline_text;
439 int completion_inline_dots;
441 double completion_popup_delay;
443 bool completion_popup_math;
445 bool completion_popup_text;
447 bool completion_popup_after_complete;
449 bool open_buffers_in_tabs;
453 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
454 * It can be forward-declared and passed as a function argument without
455 * having to expose LyXRC.h.
457 class LyXRC_PreviewStatus {
458 LyXRC::PreviewStatus val_;
460 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
461 operator LyXRC::PreviewStatus() const { return val_; }
468 extern LyXRC system_lyxrc;
470 // used by at least frontends/qt4/GuiPref.cpp
471 const long maxlastfiles = 20;