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_CUSTOM_EXPORT_COMMAND,
66 RC_CUSTOM_EXPORT_FORMAT,
67 RC_DATE_INSERT_FORMAT,
72 RC_DIALOGS_ICONIFY_WITH_MAIN,
80 RC_FULL_SCREEN_SCROLLBAR,
81 RC_FULL_SCREEN_TABBAR,
82 RC_FULL_SCREEN_TOOLBARS,
92 RC_LANGUAGE_AUTO_BEGIN,
94 RC_LANGUAGE_COMMAND_BEGIN,
95 RC_LANGUAGE_COMMAND_END,
96 RC_LANGUAGE_COMMAND_LOCAL,
97 RC_LANGUAGE_GLOBAL_OPTIONS,
99 RC_LANGUAGE_USE_BABEL,
103 RC_MARK_FOREIGN_LANGUAGE,
104 RC_MOUSE_WHEEL_SPEED,
109 RC_PREVIEW_HASHED_LABELS,
110 RC_PREVIEW_SCALE_FACTOR,
111 RC_PRINTCOLLCOPIESFLAG,
114 RC_PRINTEVENPAGEFLAG,
115 RC_PRINTEXSTRAOPTIONS,
116 RC_PRINTFILEEXTENSION,
117 RC_PRINTLANDSCAPEFLAG,
119 RC_PRINTPAGERANGEFLAG,
120 RC_PRINTPAPERDIMENSIONFLAG,
123 RC_PRINTSPOOL_COMMAND,
124 RC_PRINTSPOOL_PRINTERPREFIX,
127 RC_PRINT_ADAPTOUTPUT,
131 RC_SCREEN_FONT_ROMAN,
132 RC_SCREEN_FONT_ROMAN_FOUNDRY,
134 RC_SCREEN_FONT_SANS_FOUNDRY,
135 RC_SCREEN_FONT_SCALABLE,
136 RC_SCREEN_FONT_SIZES,
137 RC_SCREEN_FONT_TYPEWRITER,
138 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
143 RC_OPEN_BUFFERS_IN_TABS,
148 RC_TEX_ALLOWS_SPACES,
149 RC_TEX_EXPECTS_WINDOWS_PATHS,
156 RC_USE_CONVERTER_CACHE,
163 RC_VIEWDVI_PAPEROPTION,
174 int read(support::FileName const & filename);
176 int read(std::istream &);
182 void write(support::FileName const & filename,
183 bool ignore_system_lyxrc) const;
184 /// write rc. If a specific tag is given, only output that one.
185 void write(std::ostream & os,
186 bool ignore_system_lyxrc,
187 std::string const & tag = std::string()) const;
190 // FIXME unused (was used for xforms. Do we still need this?)
191 //static docstring const getDescription(LyXRCTags);
193 std::string bind_file;
195 std::string def_file;
201 std::string print_command;
203 std::string print_evenpage_flag;
205 std::string print_oddpage_flag;
207 std::string print_pagerange_flag;
209 std::string print_copies_flag;
211 std::string print_collcopies_flag;
213 std::string print_reverse_flag;
215 std::string print_landscape_flag;
217 std::string print_to_printer;
219 bool print_adapt_output;
221 std::string print_to_file;
223 std::string print_file_extension;
225 std::string print_extra_options;
227 std::string print_spool_command;
229 std::string print_spool_printerprefix;
231 std::string print_paper_flag;
233 std::string print_paper_dimension_flag;
235 std::string custom_export_command;
237 std::string custom_export_format;
238 /// option for telling the dvi viewer about the paper size
239 std::string view_dvi_paper_option;
240 /// default paper size for local xdvi/dvips/ghostview/whatever
241 PAPER_SIZE default_papersize;
242 /// command to run chktex incl. options
243 std::string chktex_command;
244 /// command to run bibtex incl. options
245 std::string bibtex_command;
246 /// command to run makeindex incl. options or other index programs
247 std::string index_command;
249 std::string document_path;
251 std::string example_path;
253 std::string template_path;
255 std::string tempdir_path;
257 bool auto_region_delete;
258 /// flag telling whether lastfiles should be checked for existance
259 bool auto_reset_options;
261 bool check_lastfiles;
262 /// maximal number of lastfiles
263 unsigned int num_lastfiles;
264 /// whether or not go to saved position when opening a file
265 bool use_lastfilepos;
266 /// load files from last session automatically
268 /// shall a backup file be created
270 /// A directory for storing backup files
271 std::string backupdir_path;
272 /// Whether or not save/restore session information
273 /// like windows position and geometry.
274 bool allow_geometry_session;
275 /// Scrolling speed of the mouse wheel
276 double mouse_wheel_speed;
277 /// Zoom factor for screen fonts
279 /// Screen font sizes in points for each font size
280 std::string font_sizes[10];
281 /// Allow the use of scalable fonts? Default is yes.
282 bool use_scalable_fonts;
288 std::string roman_font_name;
290 std::string sans_font_name;
292 std::string typewriter_font_name;
294 std::string roman_font_foundry;
296 std::string sans_font_foundry;
298 std::string typewriter_font_foundry;
300 unsigned int autosave;
302 std::string plaintext_roff_command;
304 unsigned int plaintext_linelen;
305 /// use library instead of process
308 std::string isp_command;
309 /// Accept compound words in spellchecker?
310 bool isp_accept_compound;
311 /// Pass input encoding switch to ispell?
312 bool isp_use_input_encoding;
313 /// Use alternate language?
314 bool isp_use_alt_lang;
315 /// Use personal dictionary?
316 bool isp_use_pers_dict;
319 /// Use pixmap cache?
320 bool use_pixmap_cache;
321 /// Use escape chars?
322 bool isp_use_esc_chars;
323 /// Alternate language for ispell
324 std::string isp_alt_lang;
325 /// Alternate personal dictionary file for ispell
326 std::string isp_pers_dict;
327 /// Escape characters
328 std::string isp_esc_chars;
332 std::string primary_kbmap;
334 std::string secondary_kbmap;
336 std::string lyxpipes;
338 std::string date_insert_format;
340 std::string language_package;
342 bool language_auto_begin;
344 bool language_auto_end;
346 std::string language_command_begin;
348 std::string language_command_end;
350 std::string language_command_local;
352 bool language_global_options;
354 bool language_use_babel;
357 /// bidi cursor movement: true = visual, false = logical
362 bool mark_foreign_language;
364 std::string default_language;
366 std::string gui_language;
368 bool cursor_follows_scrollbar;
370 enum MacroEditStyle {
371 MACRO_EDIT_INLINE_BOX = 0,
376 MacroEditStyle macro_edit_style;
378 bool dialogs_iconify_with_main;
380 int label_init_length;
382 bool display_graphics;
392 PreviewStatus preview;
394 bool preview_hashed_labels;
396 std::string preview_scale_factor;
398 std::string user_name;
400 std::string user_email;
401 /// True if the TeX engine cannot handle posix paths
402 bool windows_style_tex_paths;
403 /// True if the TeX engine can handle file names containing spaces
404 bool tex_allows_spaces;
405 /** Prepend paths to the PATH environment variable.
406 * The string is input, stored and output in native format.
408 std::string path_prefix;
409 /// Use the cache for file converters?
410 bool use_converter_cache;
411 /// The maximum age of cache files in seconds
412 unsigned int converter_cache_maxage;
413 /// Sort layouts alphabetically
415 /// Group layout by their category
417 /// Toggle toolbars in fullscreen mode?
418 bool full_screen_toolbars;
419 /// Toggle scrollbar in fullscreen mode?
420 bool full_screen_scrollbar;
421 /// Toggle tabbar in fullscreen mode?
422 bool full_screen_tabbar;
423 /// Limit the text width?
424 bool full_screen_limit;
425 /// Width of limited screen (in pixels) in fullscreen mode
426 int full_screen_width;
428 bool completion_cursor_text;
430 double completion_inline_delay;
432 bool completion_inline_math;
434 bool completion_inline_text;
436 int completion_inline_dots;
438 double completion_popup_delay;
440 bool completion_popup_math;
442 bool completion_popup_text;
444 bool completion_popup_after_complete;
446 bool open_buffers_in_tabs;
450 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
451 * It can be forward-declared and passed as a function argument without
452 * having to expose LyXRC.h.
454 class LyXRC_PreviewStatus {
455 LyXRC::PreviewStatus val_;
457 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
458 operator LyXRC::PreviewStatus() const { return val_; }
465 extern LyXRC system_lyxrc;