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,
53 RC_CONVERTER_CACHE_MAXAGE,
55 RC_CURSOR_FOLLOWS_SCROLLBAR,
56 RC_CUSTOM_EXPORT_COMMAND,
57 RC_CUSTOM_EXPORT_FORMAT,
58 RC_DATE_INSERT_FORMAT,
62 RC_DIALOGS_ICONIFY_WITH_MAIN,
74 RC_LANGUAGE_AUTO_BEGIN,
76 RC_LANGUAGE_COMMAND_BEGIN,
77 RC_LANGUAGE_COMMAND_END,
78 RC_LANGUAGE_COMMAND_LOCAL,
79 RC_LANGUAGE_GLOBAL_OPTIONS,
81 RC_LANGUAGE_USE_BABEL,
85 RC_MARK_FOREIGN_LANGUAGE,
90 RC_PREVIEW_HASHED_LABELS,
91 RC_PREVIEW_SCALE_FACTOR,
92 RC_PRINTCOLLCOPIESFLAG,
96 RC_PRINTEXSTRAOPTIONS,
97 RC_PRINTFILEEXTENSION,
98 RC_PRINTLANDSCAPEFLAG,
100 RC_PRINTPAGERANGEFLAG,
101 RC_PRINTPAPERDIMENSIONFLAG,
104 RC_PRINTSPOOL_COMMAND,
105 RC_PRINTSPOOL_PRINTERPREFIX,
108 RC_PRINT_ADAPTOUTPUT,
112 RC_SCREEN_FONT_ROMAN,
113 RC_SCREEN_FONT_ROMAN_FOUNDRY,
115 RC_SCREEN_FONT_SANS_FOUNDRY,
116 RC_SCREEN_FONT_SCALABLE,
117 RC_SCREEN_FONT_SIZES,
118 RC_SCREEN_FONT_TYPEWRITER,
119 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
120 RC_SCREEN_GEOMETRY_HEIGHT,
121 RC_SCREEN_GEOMETRY_WIDTH,
122 RC_SCREEN_GEOMETRY_XYSAVED,
130 RC_TEX_ALLOWS_SPACES,
131 RC_TEX_EXPECTS_WINDOWS_PATHS,
137 RC_USE_CONVERTER_CACHE,
143 RC_VIEWDVI_PAPEROPTION,
153 int read(support::FileName const & filename);
155 int read(std::istream &);
161 void write(support::FileName const & filename,
162 bool ignore_system_lyxrc) const;
163 /// write rc. If a specific tag is given, only output that one.
164 void write(std::ostream & os,
165 bool ignore_system_lyxrc,
166 std::string const & tag = std::string()) const;
169 // FIXME unused (was used for xforms. Do we still need this?)
170 //static docstring const getDescription(LyXRCTags);
172 std::string bind_file;
174 std::string def_file;
180 std::string print_command;
182 std::string print_evenpage_flag;
184 std::string print_oddpage_flag;
186 std::string print_pagerange_flag;
188 std::string print_copies_flag;
190 std::string print_collcopies_flag;
192 std::string print_reverse_flag;
194 std::string print_landscape_flag;
196 std::string print_to_printer;
198 bool print_adapt_output;
200 std::string print_to_file;
202 std::string print_file_extension;
204 std::string print_extra_options;
206 std::string print_spool_command;
208 std::string print_spool_printerprefix;
210 std::string print_paper_flag;
212 std::string print_paper_dimension_flag;
214 std::string custom_export_command;
216 std::string custom_export_format;
217 /// option for telling the dvi viewer about the paper size
218 std::string view_dvi_paper_option;
219 /// default paper size for local xdvi/dvips/ghostview/whatever
220 PAPER_SIZE default_papersize;
221 /// command to run chktex incl. options
222 std::string chktex_command;
223 /// command to run bibtex incl. options
224 std::string bibtex_command;
225 /// command to run makeindex incl. options or other index programs
226 std::string index_command;
228 std::string document_path;
230 std::string template_path;
232 std::string tempdir_path;
234 bool auto_region_delete;
235 /// flag telling whether lastfiles should be checked for existance
236 bool auto_reset_options;
238 bool check_lastfiles;
239 /// maximal number of lastfiles
240 unsigned int num_lastfiles;
241 /// whether or not go to saved position when opening a file
242 bool use_lastfilepos;
243 /// load files from last session automatically
245 /// shall a backup file be created
247 /// A directory for storing backup files
248 std::string backupdir_path;
249 /// Width of MainWindow. if 0, value from last session will be used
251 /// Height of MainWindow, if 0, value from last session will be used
253 /// Whether or not save/restore windows position as session info
254 bool geometry_xysaved;
255 /// Zoom factor for screen fonts
257 /// Screen font sizes in points for each font size
258 std::string font_sizes[10];
259 /// Allow the use of scalable fonts? Default is yes.
260 bool use_scalable_fonts;
266 std::string roman_font_name;
268 std::string sans_font_name;
270 std::string typewriter_font_name;
272 std::string roman_font_foundry;
274 std::string sans_font_foundry;
276 std::string typewriter_font_foundry;
278 unsigned int autosave;
280 std::string plaintext_roff_command;
282 unsigned int plaintext_linelen;
283 /// use library instead of process
286 std::string isp_command;
287 /// Accept compound words in spellchecker?
288 bool isp_accept_compound;
289 /// Pass input encoding switch to ispell?
290 bool isp_use_input_encoding;
291 /// Use alternate language?
292 bool isp_use_alt_lang;
293 /// Use personal dictionary?
294 bool isp_use_pers_dict;
295 /// Use pixmap cache?
296 bool use_pixmap_cache;
297 /// Use escape chars?
298 bool isp_use_esc_chars;
299 /// Alternate language for ispell
300 std::string isp_alt_lang;
301 /// Alternate personal dictionary file for ispell
302 std::string isp_pers_dict;
303 /// Escape characters
304 std::string isp_esc_chars;
308 std::string primary_kbmap;
310 std::string secondary_kbmap;
312 std::string lyxpipes;
314 std::string date_insert_format;
316 std::string language_package;
318 bool language_auto_begin;
320 bool language_auto_end;
322 std::string language_command_begin;
324 std::string language_command_end;
326 std::string language_command_local;
328 bool language_global_options;
330 bool language_use_babel;
336 bool mark_foreign_language;
338 std::string default_language;
340 bool cursor_follows_scrollbar;
342 bool dialogs_iconify_with_main;
344 int label_init_length;
346 ///graphics::DisplayType
347 int display_graphics;
357 PreviewStatus preview;
359 bool preview_hashed_labels;
361 std::string preview_scale_factor;
363 std::string user_name;
365 std::string user_email;
366 /// True if the TeX engine cannot handle posix paths
367 bool windows_style_tex_paths;
368 /// True if the TeX engine can handle file names containing spaces
369 bool tex_allows_spaces;
370 /** Prepend paths to the PATH environment variable.
371 * The string is input, stored and output in native format.
373 std::string path_prefix;
374 /// Use the cache for file converters?
375 bool use_converter_cache;
376 /// The maximum age of cache files in seconds
377 unsigned int converter_cache_maxage;
381 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
382 * It can be forward-declared and passed as a function argument without
383 * having to expose LyXRC.h.
385 class LyXRC_PreviewStatus {
386 LyXRC::PreviewStatus val_;
388 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
389 operator LyXRC::PreviewStatus() const { return val_; }
396 extern LyXRC system_lyxrc;