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_PLAINTEXT_ROFF_COMMAND,
52 RC_COMPLETION_INLINE_DELAY,
53 RC_COMPLETION_INLINE_MATH,
54 RC_COMPLETION_INLINE_TEXT,
55 RC_COMPLETION_INLINE_DOTS,
56 RC_COMPLETION_POPUP_DELAY,
57 RC_COMPLETION_POPUP_MATH,
58 RC_COMPLETION_POPUP_TEXT,
59 RC_COMPLETION_POPUP_AFTER_COMPLETE,
61 RC_CONVERTER_CACHE_MAXAGE,
63 RC_CURSOR_FOLLOWS_SCROLLBAR,
64 RC_CUSTOM_EXPORT_COMMAND,
65 RC_CUSTOM_EXPORT_FORMAT,
66 RC_DATE_INSERT_FORMAT,
70 RC_DIALOGS_ICONIFY_WITH_MAIN,
78 RC_FULL_SCREEN_SCROLLBAR,
79 RC_FULL_SCREEN_TABBAR,
80 RC_FULL_SCREEN_TOOLBARS,
90 RC_LANGUAGE_AUTO_BEGIN,
92 RC_LANGUAGE_COMMAND_BEGIN,
93 RC_LANGUAGE_COMMAND_END,
94 RC_LANGUAGE_COMMAND_LOCAL,
95 RC_LANGUAGE_GLOBAL_OPTIONS,
97 RC_LANGUAGE_USE_BABEL,
101 RC_MARK_FOREIGN_LANGUAGE,
102 RC_MOUSE_WHEEL_SPEED,
107 RC_PREVIEW_HASHED_LABELS,
108 RC_PREVIEW_SCALE_FACTOR,
109 RC_PRINTCOLLCOPIESFLAG,
112 RC_PRINTEVENPAGEFLAG,
113 RC_PRINTEXSTRAOPTIONS,
114 RC_PRINTFILEEXTENSION,
115 RC_PRINTLANDSCAPEFLAG,
117 RC_PRINTPAGERANGEFLAG,
118 RC_PRINTPAPERDIMENSIONFLAG,
121 RC_PRINTSPOOL_COMMAND,
122 RC_PRINTSPOOL_PRINTERPREFIX,
125 RC_PRINT_ADAPTOUTPUT,
129 RC_SCREEN_FONT_ROMAN,
130 RC_SCREEN_FONT_ROMAN_FOUNDRY,
132 RC_SCREEN_FONT_SANS_FOUNDRY,
133 RC_SCREEN_FONT_SCALABLE,
134 RC_SCREEN_FONT_SIZES,
135 RC_SCREEN_FONT_TYPEWRITER,
136 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
146 RC_TEX_ALLOWS_SPACES,
147 RC_TEX_EXPECTS_WINDOWS_PATHS,
154 RC_USE_CONVERTER_CACHE,
161 RC_VIEWDVI_PAPEROPTION,
172 int read(support::FileName const & filename);
174 int read(std::istream &);
180 void write(support::FileName const & filename,
181 bool ignore_system_lyxrc) const;
182 /// write rc. If a specific tag is given, only output that one.
183 void write(std::ostream & os,
184 bool ignore_system_lyxrc,
185 std::string const & tag = std::string()) const;
188 // FIXME unused (was used for xforms. Do we still need this?)
189 //static docstring const getDescription(LyXRCTags);
191 std::string bind_file;
193 std::string def_file;
199 std::string print_command;
201 std::string print_evenpage_flag;
203 std::string print_oddpage_flag;
205 std::string print_pagerange_flag;
207 std::string print_copies_flag;
209 std::string print_collcopies_flag;
211 std::string print_reverse_flag;
213 std::string print_landscape_flag;
215 std::string print_to_printer;
217 bool print_adapt_output;
219 std::string print_to_file;
221 std::string print_file_extension;
223 std::string print_extra_options;
225 std::string print_spool_command;
227 std::string print_spool_printerprefix;
229 std::string print_paper_flag;
231 std::string print_paper_dimension_flag;
233 std::string custom_export_command;
235 std::string custom_export_format;
236 /// option for telling the dvi viewer about the paper size
237 std::string view_dvi_paper_option;
238 /// default paper size for local xdvi/dvips/ghostview/whatever
239 PAPER_SIZE default_papersize;
240 /// command to run chktex incl. options
241 std::string chktex_command;
242 /// command to run bibtex incl. options
243 std::string bibtex_command;
244 /// command to run makeindex incl. options or other index programs
245 std::string index_command;
247 std::string document_path;
249 std::string example_path;
251 std::string template_path;
253 std::string tempdir_path;
255 bool auto_region_delete;
256 /// flag telling whether lastfiles should be checked for existance
257 bool auto_reset_options;
259 bool check_lastfiles;
260 /// maximal number of lastfiles
261 unsigned int num_lastfiles;
262 /// whether or not go to saved position when opening a file
263 bool use_lastfilepos;
264 /// load files from last session automatically
266 /// shall a backup file be created
268 /// A directory for storing backup files
269 std::string backupdir_path;
270 /// Whether or not save/restore session information
271 /// like windows position and geometry.
272 bool allow_geometry_session;
273 /// Scrolling speed of the mouse wheel
274 double mouse_wheel_speed;
275 /// Zoom factor for screen fonts
277 /// Screen font sizes in points for each font size
278 std::string font_sizes[10];
279 /// Allow the use of scalable fonts? Default is yes.
280 bool use_scalable_fonts;
286 std::string roman_font_name;
288 std::string sans_font_name;
290 std::string typewriter_font_name;
292 std::string roman_font_foundry;
294 std::string sans_font_foundry;
296 std::string typewriter_font_foundry;
298 unsigned int autosave;
300 std::string plaintext_roff_command;
302 unsigned int plaintext_linelen;
303 /// use library instead of process
306 std::string isp_command;
307 /// Accept compound words in spellchecker?
308 bool isp_accept_compound;
309 /// Pass input encoding switch to ispell?
310 bool isp_use_input_encoding;
311 /// Use alternate language?
312 bool isp_use_alt_lang;
313 /// Use personal dictionary?
314 bool isp_use_pers_dict;
317 /// Use pixmap cache?
318 bool use_pixmap_cache;
319 /// Use escape chars?
320 bool isp_use_esc_chars;
321 /// Alternate language for ispell
322 std::string isp_alt_lang;
323 /// Alternate personal dictionary file for ispell
324 std::string isp_pers_dict;
325 /// Escape characters
326 std::string isp_esc_chars;
330 std::string primary_kbmap;
332 std::string secondary_kbmap;
334 std::string lyxpipes;
336 std::string date_insert_format;
338 std::string language_package;
340 bool language_auto_begin;
342 bool language_auto_end;
344 std::string language_command_begin;
346 std::string language_command_end;
348 std::string language_command_local;
350 bool language_global_options;
352 bool language_use_babel;
355 /// bidi cursor movement: true = visual, false = logical
360 bool mark_foreign_language;
362 std::string default_language;
364 bool cursor_follows_scrollbar;
366 enum MacroEditStyle {
367 MACRO_EDIT_INLINE_BOX = 0,
372 MacroEditStyle macro_edit_style;
374 bool dialogs_iconify_with_main;
376 int label_init_length;
378 ///graphics::DisplayType
379 int display_graphics;
389 PreviewStatus preview;
391 bool preview_hashed_labels;
393 std::string preview_scale_factor;
395 std::string user_name;
397 std::string user_email;
398 /// True if the TeX engine cannot handle posix paths
399 bool windows_style_tex_paths;
400 /// True if the TeX engine can handle file names containing spaces
401 bool tex_allows_spaces;
402 /** Prepend paths to the PATH environment variable.
403 * The string is input, stored and output in native format.
405 std::string path_prefix;
406 /// Use the cache for file converters?
407 bool use_converter_cache;
408 /// The maximum age of cache files in seconds
409 unsigned int converter_cache_maxage;
410 /// Sort layouts alphabetically
412 /// Group layout by their category
414 /// Toggle toolbars in fullscreen mode?
415 bool full_screen_toolbars;
416 /// Toggle scrollbar in fullscreen mode?
417 bool full_screen_scrollbar;
418 /// Toggle tabbar in fullscreen mode?
419 bool full_screen_tabbar;
420 /// Limit the text width?
421 bool full_screen_limit;
422 /// Width of limited screen (in pixels) in fullscreen mode
423 int full_screen_width;
425 double completion_inline_delay;
427 bool completion_inline_math;
429 bool completion_inline_text;
431 int completion_inline_dots;
433 double completion_popup_delay;
435 bool completion_popup_math;
437 bool completion_popup_text;
439 bool completion_popup_after_complete;
440 /// Open new buffers in the current window as tab.
445 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
446 * It can be forward-declared and passed as a function argument without
447 * having to expose LyXRC.h.
449 class LyXRC_PreviewStatus {
450 LyXRC::PreviewStatus val_;
452 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
453 operator LyXRC::PreviewStatus() const { return val_; }
460 extern LyXRC system_lyxrc;