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,
145 RC_TEX_ALLOWS_SPACES,
146 RC_TEX_EXPECTS_WINDOWS_PATHS,
153 RC_USE_CONVERTER_CACHE,
160 RC_VIEWDVI_PAPEROPTION,
171 int read(support::FileName const & filename);
173 int read(std::istream &);
179 void write(support::FileName const & filename,
180 bool ignore_system_lyxrc) const;
181 /// write rc. If a specific tag is given, only output that one.
182 void write(std::ostream & os,
183 bool ignore_system_lyxrc,
184 std::string const & tag = std::string()) const;
187 // FIXME unused (was used for xforms. Do we still need this?)
188 //static docstring const getDescription(LyXRCTags);
190 std::string bind_file;
192 std::string def_file;
198 std::string print_command;
200 std::string print_evenpage_flag;
202 std::string print_oddpage_flag;
204 std::string print_pagerange_flag;
206 std::string print_copies_flag;
208 std::string print_collcopies_flag;
210 std::string print_reverse_flag;
212 std::string print_landscape_flag;
214 std::string print_to_printer;
216 bool print_adapt_output;
218 std::string print_to_file;
220 std::string print_file_extension;
222 std::string print_extra_options;
224 std::string print_spool_command;
226 std::string print_spool_printerprefix;
228 std::string print_paper_flag;
230 std::string print_paper_dimension_flag;
232 std::string custom_export_command;
234 std::string custom_export_format;
235 /// option for telling the dvi viewer about the paper size
236 std::string view_dvi_paper_option;
237 /// default paper size for local xdvi/dvips/ghostview/whatever
238 PAPER_SIZE default_papersize;
239 /// command to run chktex incl. options
240 std::string chktex_command;
241 /// command to run bibtex incl. options
242 std::string bibtex_command;
243 /// command to run makeindex incl. options or other index programs
244 std::string index_command;
246 std::string document_path;
248 std::string example_path;
250 std::string template_path;
252 std::string tempdir_path;
254 bool auto_region_delete;
255 /// flag telling whether lastfiles should be checked for existance
256 bool auto_reset_options;
258 bool check_lastfiles;
259 /// maximal number of lastfiles
260 unsigned int num_lastfiles;
261 /// whether or not go to saved position when opening a file
262 bool use_lastfilepos;
263 /// load files from last session automatically
265 /// shall a backup file be created
267 /// A directory for storing backup files
268 std::string backupdir_path;
269 /// Whether or not save/restore session information
270 /// like windows position and geometry.
271 bool allow_geometry_session;
272 /// Scrolling speed of the mouse wheel
273 double mouse_wheel_speed;
274 /// Zoom factor for screen fonts
276 /// Screen font sizes in points for each font size
277 std::string font_sizes[10];
278 /// Allow the use of scalable fonts? Default is yes.
279 bool use_scalable_fonts;
285 std::string roman_font_name;
287 std::string sans_font_name;
289 std::string typewriter_font_name;
291 std::string roman_font_foundry;
293 std::string sans_font_foundry;
295 std::string typewriter_font_foundry;
297 unsigned int autosave;
299 std::string plaintext_roff_command;
301 unsigned int plaintext_linelen;
302 /// use library instead of process
305 std::string isp_command;
306 /// Accept compound words in spellchecker?
307 bool isp_accept_compound;
308 /// Pass input encoding switch to ispell?
309 bool isp_use_input_encoding;
310 /// Use alternate language?
311 bool isp_use_alt_lang;
312 /// Use personal dictionary?
313 bool isp_use_pers_dict;
316 /// Use pixmap cache?
317 bool use_pixmap_cache;
318 /// Use escape chars?
319 bool isp_use_esc_chars;
320 /// Alternate language for ispell
321 std::string isp_alt_lang;
322 /// Alternate personal dictionary file for ispell
323 std::string isp_pers_dict;
324 /// Escape characters
325 std::string isp_esc_chars;
329 std::string primary_kbmap;
331 std::string secondary_kbmap;
333 std::string lyxpipes;
335 std::string date_insert_format;
337 std::string language_package;
339 bool language_auto_begin;
341 bool language_auto_end;
343 std::string language_command_begin;
345 std::string language_command_end;
347 std::string language_command_local;
349 bool language_global_options;
351 bool language_use_babel;
354 /// bidi cursor movement: true = visual, false = logical
359 bool mark_foreign_language;
361 std::string default_language;
363 bool cursor_follows_scrollbar;
365 enum MacroEditStyle {
366 MACRO_EDIT_INLINE_BOX = 0,
371 MacroEditStyle macro_edit_style;
373 bool dialogs_iconify_with_main;
375 int label_init_length;
377 ///graphics::DisplayType
378 int display_graphics;
388 PreviewStatus preview;
390 bool preview_hashed_labels;
392 std::string preview_scale_factor;
394 std::string user_name;
396 std::string user_email;
397 /// True if the TeX engine cannot handle posix paths
398 bool windows_style_tex_paths;
399 /// True if the TeX engine can handle file names containing spaces
400 bool tex_allows_spaces;
401 /** Prepend paths to the PATH environment variable.
402 * The string is input, stored and output in native format.
404 std::string path_prefix;
405 /// Use the cache for file converters?
406 bool use_converter_cache;
407 /// The maximum age of cache files in seconds
408 unsigned int converter_cache_maxage;
409 /// Sort layouts alphabetically
411 /// Group layout by their category
413 /// Toggle toolbars in fullscreen mode?
414 bool full_screen_toolbars;
415 /// Toggle scrollbar in fullscreen mode?
416 bool full_screen_scrollbar;
417 /// Toggle tabbar in fullscreen mode?
418 bool full_screen_tabbar;
419 /// Limit the text width?
420 bool full_screen_limit;
421 /// Width of limited screen (in pixels) in fullscreen mode
422 int full_screen_width;
424 double completion_inline_delay;
426 bool completion_inline_math;
428 bool completion_inline_text;
430 int completion_inline_dots;
432 double completion_popup_delay;
434 bool completion_popup_math;
436 bool completion_popup_text;
438 bool completion_popup_after_complete;
442 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
443 * It can be forward-declared and passed as a function argument without
444 * having to expose LyXRC.h.
446 class LyXRC_PreviewStatus {
447 LyXRC::PreviewStatus val_;
449 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
450 operator LyXRC::PreviewStatus() const { return val_; }
457 extern LyXRC system_lyxrc;