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_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,
158 RC_USE_CONVERTER_CACHE,
165 RC_VIEWDVI_PAPEROPTION,
176 int read(support::FileName const & filename);
178 int read(std::istream &);
184 void write(support::FileName const & filename,
185 bool ignore_system_lyxrc) const;
186 /// write rc. If a specific tag is given, only output that one.
187 void write(std::ostream & os,
188 bool ignore_system_lyxrc,
189 std::string const & tag = std::string()) const;
192 // FIXME unused (was used for xforms. Do we still need this?)
193 //static docstring const getDescription(LyXRCTags);
195 std::string bind_file;
197 std::string def_file;
203 std::string print_command;
205 std::string print_evenpage_flag;
207 std::string print_oddpage_flag;
209 std::string print_pagerange_flag;
211 std::string print_copies_flag;
213 std::string print_collcopies_flag;
215 std::string print_reverse_flag;
217 std::string print_landscape_flag;
219 std::string print_to_printer;
221 bool print_adapt_output;
223 std::string print_to_file;
225 std::string print_file_extension;
227 std::string print_extra_options;
229 std::string print_spool_command;
231 std::string print_spool_printerprefix;
233 std::string print_paper_flag;
235 std::string print_paper_dimension_flag;
237 std::string custom_export_command;
239 std::string custom_export_format;
240 /// option for telling the dvi viewer about the paper size
241 std::string view_dvi_paper_option;
242 /// default paper size for local xdvi/dvips/ghostview/whatever
243 PAPER_SIZE default_papersize;
244 /// command to run chktex incl. options
245 std::string chktex_command;
246 /// command to run bibtex incl. options
247 std::string bibtex_command;
248 /// command to run makeindex incl. options or other index programs
249 std::string index_command;
250 /// command to run makeindex incl. options for nomencl
251 std::string nomencl_command;
253 std::string document_path;
255 std::string example_path;
257 std::string template_path;
259 std::string tempdir_path;
261 bool auto_region_delete;
262 /// flag telling whether lastfiles should be checked for existance
263 bool auto_reset_options;
265 bool check_lastfiles;
266 /// maximal number of lastfiles
267 unsigned int num_lastfiles;
268 /// whether or not go to saved position when opening a file
269 bool use_lastfilepos;
270 /// load files from last session automatically
272 /// shall a backup file be created
274 /// A directory for storing backup files
275 std::string backupdir_path;
276 /// Whether or not save/restore session information
277 /// like windows position and geometry.
278 bool allow_geometry_session;
279 /// Scrolling speed of the mouse wheel
280 double mouse_wheel_speed;
281 /// Zoom factor for screen fonts
283 /// Screen font sizes in points for each font size
284 std::string font_sizes[10];
285 /// Allow the use of scalable fonts? Default is yes.
286 bool use_scalable_fonts;
292 std::string roman_font_name;
294 std::string sans_font_name;
296 std::string typewriter_font_name;
298 std::string roman_font_foundry;
300 std::string sans_font_foundry;
302 std::string typewriter_font_foundry;
304 unsigned int autosave;
306 std::string plaintext_roff_command;
308 unsigned int plaintext_linelen;
309 /// use library instead of process
312 std::string isp_command;
313 /// Accept compound words in spellchecker?
314 bool isp_accept_compound;
315 /// Pass input encoding switch to ispell?
316 bool isp_use_input_encoding;
317 /// Use alternate language?
318 bool isp_use_alt_lang;
319 /// Use personal dictionary?
320 bool isp_use_pers_dict;
323 /// Use pixmap cache?
324 bool use_pixmap_cache;
325 /// Use escape chars?
326 bool isp_use_esc_chars;
327 /// Alternate language for ispell
328 std::string isp_alt_lang;
329 /// Alternate personal dictionary file for ispell
330 std::string isp_pers_dict;
331 /// Escape characters
332 std::string isp_esc_chars;
336 std::string primary_kbmap;
338 std::string secondary_kbmap;
340 std::string lyxpipes;
342 std::string date_insert_format;
344 std::string language_package;
346 bool language_auto_begin;
348 bool language_auto_end;
350 std::string language_command_begin;
352 std::string language_command_end;
354 std::string language_command_local;
356 bool language_global_options;
358 bool language_use_babel;
361 /// bidi cursor movement: true = visual, false = logical
366 bool mark_foreign_language;
368 std::string default_language;
370 std::string gui_language;
372 bool mac_like_word_movement;
374 bool cursor_follows_scrollbar;
376 enum MacroEditStyle {
377 MACRO_EDIT_INLINE_BOX = 0,
382 MacroEditStyle macro_edit_style;
384 bool dialogs_iconify_with_main;
386 int label_init_length;
388 bool display_graphics;
398 PreviewStatus preview;
400 bool preview_hashed_labels;
402 std::string preview_scale_factor;
404 std::string user_name;
406 std::string user_email;
407 /// True if the TeX engine cannot handle posix paths
408 bool windows_style_tex_paths;
409 /// True if the TeX engine can handle file names containing spaces
410 bool tex_allows_spaces;
411 /** Prepend paths to the PATH environment variable.
412 * The string is input, stored and output in native format.
414 std::string path_prefix;
415 /// Use the cache for file converters?
416 bool use_converter_cache;
417 /// The maximum age of cache files in seconds
418 unsigned int converter_cache_maxage;
419 /// Sort layouts alphabetically
421 /// Group layout by their category
423 /// Toggle toolbars in fullscreen mode?
424 bool full_screen_toolbars;
425 /// Toggle scrollbar in fullscreen mode?
426 bool full_screen_scrollbar;
427 /// Toggle tabbar in fullscreen mode?
428 bool full_screen_tabbar;
429 /// Limit the text width?
430 bool full_screen_limit;
431 /// Width of limited screen (in pixels) in fullscreen mode
432 int full_screen_width;
434 bool completion_cursor_text;
436 double completion_inline_delay;
438 bool completion_inline_math;
440 bool completion_inline_text;
442 int completion_inline_dots;
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;