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,
75 RC_LANGUAGE_AUTO_BEGIN,
77 RC_LANGUAGE_COMMAND_BEGIN,
78 RC_LANGUAGE_COMMAND_END,
79 RC_LANGUAGE_COMMAND_LOCAL,
80 RC_LANGUAGE_GLOBAL_OPTIONS,
82 RC_LANGUAGE_USE_BABEL,
87 RC_MARK_FOREIGN_LANGUAGE,
92 RC_PREVIEW_HASHED_LABELS,
93 RC_PREVIEW_SCALE_FACTOR,
94 RC_PRINTCOLLCOPIESFLAG,
98 RC_PRINTEXSTRAOPTIONS,
99 RC_PRINTFILEEXTENSION,
100 RC_PRINTLANDSCAPEFLAG,
102 RC_PRINTPAGERANGEFLAG,
103 RC_PRINTPAPERDIMENSIONFLAG,
106 RC_PRINTSPOOL_COMMAND,
107 RC_PRINTSPOOL_PRINTERPREFIX,
110 RC_PRINT_ADAPTOUTPUT,
114 RC_SCREEN_FONT_ROMAN,
115 RC_SCREEN_FONT_ROMAN_FOUNDRY,
117 RC_SCREEN_FONT_SANS_FOUNDRY,
118 RC_SCREEN_FONT_SCALABLE,
119 RC_SCREEN_FONT_SIZES,
120 RC_SCREEN_FONT_TYPEWRITER,
121 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
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 example_path;
232 std::string template_path;
234 std::string tempdir_path;
236 bool auto_region_delete;
237 /// flag telling whether lastfiles should be checked for existance
238 bool auto_reset_options;
240 bool check_lastfiles;
241 /// maximal number of lastfiles
242 unsigned int num_lastfiles;
243 /// whether or not go to saved position when opening a file
244 bool use_lastfilepos;
245 /// load files from last session automatically
247 /// shall a backup file be created
249 /// A directory for storing backup files
250 std::string backupdir_path;
251 /// Whether or not save/restore session information
252 /// like windows position and geometry.
253 bool allow_geometry_session;
254 /// Zoom factor for screen fonts
256 /// Screen font sizes in points for each font size
257 std::string font_sizes[10];
258 /// Allow the use of scalable fonts? Default is yes.
259 bool use_scalable_fonts;
265 std::string roman_font_name;
267 std::string sans_font_name;
269 std::string typewriter_font_name;
271 std::string roman_font_foundry;
273 std::string sans_font_foundry;
275 std::string typewriter_font_foundry;
277 unsigned int autosave;
279 std::string plaintext_roff_command;
281 unsigned int plaintext_linelen;
282 /// use library instead of process
285 std::string isp_command;
286 /// Accept compound words in spellchecker?
287 bool isp_accept_compound;
288 /// Pass input encoding switch to ispell?
289 bool isp_use_input_encoding;
290 /// Use alternate language?
291 bool isp_use_alt_lang;
292 /// Use personal dictionary?
293 bool isp_use_pers_dict;
294 /// Use pixmap cache?
295 bool use_pixmap_cache;
296 /// Use escape chars?
297 bool isp_use_esc_chars;
298 /// Alternate language for ispell
299 std::string isp_alt_lang;
300 /// Alternate personal dictionary file for ispell
301 std::string isp_pers_dict;
302 /// Escape characters
303 std::string isp_esc_chars;
307 std::string primary_kbmap;
309 std::string secondary_kbmap;
311 std::string lyxpipes;
313 std::string date_insert_format;
315 std::string language_package;
317 bool language_auto_begin;
319 bool language_auto_end;
321 std::string language_command_begin;
323 std::string language_command_end;
325 std::string language_command_local;
327 bool language_global_options;
329 bool language_use_babel;
335 bool mark_foreign_language;
337 std::string default_language;
339 bool cursor_follows_scrollbar;
341 bool dialogs_iconify_with_main;
343 int label_init_length;
345 ///graphics::DisplayType
346 int display_graphics;
356 PreviewStatus preview;
358 bool preview_hashed_labels;
360 std::string preview_scale_factor;
362 std::string user_name;
364 std::string user_email;
365 /// True if the TeX engine cannot handle posix paths
366 bool windows_style_tex_paths;
367 /// True if the TeX engine can handle file names containing spaces
368 bool tex_allows_spaces;
369 /** Prepend paths to the PATH environment variable.
370 * The string is input, stored and output in native format.
372 std::string path_prefix;
373 /// Use the cache for file converters?
374 bool use_converter_cache;
375 /// The maximum age of cache files in seconds
376 unsigned int converter_cache_maxage;
377 /// Sort layouts alphabetically
382 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
383 * It can be forward-declared and passed as a function argument without
384 * having to expose LyXRC.h.
386 class LyXRC_PreviewStatus {
387 LyXRC::PreviewStatus val_;
389 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
390 operator LyXRC::PreviewStatus() const { return val_; }
397 extern LyXRC system_lyxrc;