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,
88 RC_LANGUAGE_AUTO_BEGIN,
90 RC_LANGUAGE_COMMAND_BEGIN,
91 RC_LANGUAGE_COMMAND_END,
92 RC_LANGUAGE_COMMAND_LOCAL,
93 RC_LANGUAGE_GLOBAL_OPTIONS,
95 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,
152 RC_USE_CONVERTER_CACHE,
159 RC_VIEWDVI_PAPEROPTION,
170 int read(support::FileName const & filename);
172 int read(std::istream &);
178 void write(support::FileName const & filename,
179 bool ignore_system_lyxrc) const;
180 /// write rc. If a specific tag is given, only output that one.
181 void write(std::ostream & os,
182 bool ignore_system_lyxrc,
183 std::string const & tag = std::string()) const;
186 // FIXME unused (was used for xforms. Do we still need this?)
187 //static docstring const getDescription(LyXRCTags);
189 std::string bind_file;
191 std::string def_file;
197 std::string print_command;
199 std::string print_evenpage_flag;
201 std::string print_oddpage_flag;
203 std::string print_pagerange_flag;
205 std::string print_copies_flag;
207 std::string print_collcopies_flag;
209 std::string print_reverse_flag;
211 std::string print_landscape_flag;
213 std::string print_to_printer;
215 bool print_adapt_output;
217 std::string print_to_file;
219 std::string print_file_extension;
221 std::string print_extra_options;
223 std::string print_spool_command;
225 std::string print_spool_printerprefix;
227 std::string print_paper_flag;
229 std::string print_paper_dimension_flag;
231 std::string custom_export_command;
233 std::string custom_export_format;
234 /// option for telling the dvi viewer about the paper size
235 std::string view_dvi_paper_option;
236 /// default paper size for local xdvi/dvips/ghostview/whatever
237 PAPER_SIZE default_papersize;
238 /// command to run chktex incl. options
239 std::string chktex_command;
240 /// command to run bibtex incl. options
241 std::string bibtex_command;
242 /// command to run makeindex incl. options or other index programs
243 std::string index_command;
245 std::string document_path;
247 std::string example_path;
249 std::string template_path;
251 std::string tempdir_path;
253 bool auto_region_delete;
254 /// flag telling whether lastfiles should be checked for existance
255 bool auto_reset_options;
257 bool check_lastfiles;
258 /// maximal number of lastfiles
259 unsigned int num_lastfiles;
260 /// whether or not go to saved position when opening a file
261 bool use_lastfilepos;
262 /// load files from last session automatically
264 /// shall a backup file be created
266 /// A directory for storing backup files
267 std::string backupdir_path;
268 /// Whether or not save/restore session information
269 /// like windows position and geometry.
270 bool allow_geometry_session;
271 /// Scrolling speed of the mouse wheel
272 double mouse_wheel_speed;
273 /// Zoom factor for screen fonts
275 /// Screen font sizes in points for each font size
276 std::string font_sizes[10];
277 /// Allow the use of scalable fonts? Default is yes.
278 bool use_scalable_fonts;
284 std::string roman_font_name;
286 std::string sans_font_name;
288 std::string typewriter_font_name;
290 std::string roman_font_foundry;
292 std::string sans_font_foundry;
294 std::string typewriter_font_foundry;
296 unsigned int autosave;
298 std::string plaintext_roff_command;
300 unsigned int plaintext_linelen;
301 /// use library instead of process
304 std::string isp_command;
305 /// Accept compound words in spellchecker?
306 bool isp_accept_compound;
307 /// Pass input encoding switch to ispell?
308 bool isp_use_input_encoding;
309 /// Use alternate language?
310 bool isp_use_alt_lang;
311 /// Use personal dictionary?
312 bool isp_use_pers_dict;
315 /// Use pixmap cache?
316 bool use_pixmap_cache;
317 /// Use escape chars?
318 bool isp_use_esc_chars;
319 /// Alternate language for ispell
320 std::string isp_alt_lang;
321 /// Alternate personal dictionary file for ispell
322 std::string isp_pers_dict;
323 /// Escape characters
324 std::string isp_esc_chars;
328 std::string primary_kbmap;
330 std::string secondary_kbmap;
332 std::string lyxpipes;
334 std::string date_insert_format;
336 std::string language_package;
338 bool language_auto_begin;
340 bool language_auto_end;
342 std::string language_command_begin;
344 std::string language_command_end;
346 std::string language_command_local;
348 bool language_global_options;
350 bool language_use_babel;
353 /// bidi cursor movement: true = visual, false = logical
358 bool mark_foreign_language;
360 std::string default_language;
362 bool cursor_follows_scrollbar;
364 enum MacroEditStyle {
365 MACRO_EDIT_INLINE_BOX = 0,
370 MacroEditStyle macro_edit_style;
372 bool dialogs_iconify_with_main;
374 int label_init_length;
376 ///graphics::DisplayType
377 int display_graphics;
387 PreviewStatus preview;
389 bool preview_hashed_labels;
391 std::string preview_scale_factor;
393 std::string user_name;
395 std::string user_email;
396 /// True if the TeX engine cannot handle posix paths
397 bool windows_style_tex_paths;
398 /// True if the TeX engine can handle file names containing spaces
399 bool tex_allows_spaces;
400 /** Prepend paths to the PATH environment variable.
401 * The string is input, stored and output in native format.
403 std::string path_prefix;
404 /// Use the cache for file converters?
405 bool use_converter_cache;
406 /// The maximum age of cache files in seconds
407 unsigned int converter_cache_maxage;
408 /// Sort layouts alphabetically
410 /// Toggle toolbars in fullscreen mode?
411 bool full_screen_toolbars;
412 /// Toggle scrollbar in fullscreen mode?
413 bool full_screen_scrollbar;
414 /// Toggle tabbar in fullscreen mode?
415 bool full_screen_tabbar;
416 /// Limit the text width?
417 bool full_screen_limit;
418 /// Width of limited screen (in pixels) in fullscreen mode
419 int full_screen_width;
421 double completion_inline_delay;
423 bool completion_inline_math;
425 bool completion_inline_text;
427 int completion_inline_dots;
429 double completion_popup_delay;
431 bool completion_popup_math;
433 bool completion_popup_text;
435 bool completion_popup_after_complete;
439 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
440 * It can be forward-declared and passed as a function argument without
441 * having to expose LyXRC.h.
443 class LyXRC_PreviewStatus {
444 LyXRC::PreviewStatus val_;
446 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
447 operator LyXRC::PreviewStatus() const { return val_; }
454 extern LyXRC system_lyxrc;