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,
131 RC_TEX_ALLOWS_SPACES,
132 RC_TEX_EXPECTS_WINDOWS_PATHS,
138 RC_USE_CONVERTER_CACHE,
145 RC_VIEWDVI_PAPEROPTION,
155 int read(support::FileName const & filename);
157 int read(std::istream &);
163 void write(support::FileName const & filename,
164 bool ignore_system_lyxrc) const;
165 /// write rc. If a specific tag is given, only output that one.
166 void write(std::ostream & os,
167 bool ignore_system_lyxrc,
168 std::string const & tag = std::string()) const;
171 // FIXME unused (was used for xforms. Do we still need this?)
172 //static docstring const getDescription(LyXRCTags);
174 std::string bind_file;
176 std::string def_file;
182 std::string print_command;
184 std::string print_evenpage_flag;
186 std::string print_oddpage_flag;
188 std::string print_pagerange_flag;
190 std::string print_copies_flag;
192 std::string print_collcopies_flag;
194 std::string print_reverse_flag;
196 std::string print_landscape_flag;
198 std::string print_to_printer;
200 bool print_adapt_output;
202 std::string print_to_file;
204 std::string print_file_extension;
206 std::string print_extra_options;
208 std::string print_spool_command;
210 std::string print_spool_printerprefix;
212 std::string print_paper_flag;
214 std::string print_paper_dimension_flag;
216 std::string custom_export_command;
218 std::string custom_export_format;
219 /// option for telling the dvi viewer about the paper size
220 std::string view_dvi_paper_option;
221 /// default paper size for local xdvi/dvips/ghostview/whatever
222 PAPER_SIZE default_papersize;
223 /// command to run chktex incl. options
224 std::string chktex_command;
225 /// command to run bibtex incl. options
226 std::string bibtex_command;
227 /// command to run makeindex incl. options or other index programs
228 std::string index_command;
230 std::string document_path;
232 std::string example_path;
234 std::string template_path;
236 std::string tempdir_path;
238 bool auto_region_delete;
239 /// flag telling whether lastfiles should be checked for existance
240 bool auto_reset_options;
242 bool check_lastfiles;
243 /// maximal number of lastfiles
244 unsigned int num_lastfiles;
245 /// whether or not go to saved position when opening a file
246 bool use_lastfilepos;
247 /// load files from last session automatically
249 /// shall a backup file be created
251 /// A directory for storing backup files
252 std::string backupdir_path;
253 /// Whether or not save/restore session information
254 /// like windows position and geometry.
255 bool allow_geometry_session;
256 /// Zoom factor for screen fonts
258 /// Screen font sizes in points for each font size
259 std::string font_sizes[10];
260 /// Allow the use of scalable fonts? Default is yes.
261 bool use_scalable_fonts;
267 std::string roman_font_name;
269 std::string sans_font_name;
271 std::string typewriter_font_name;
273 std::string roman_font_foundry;
275 std::string sans_font_foundry;
277 std::string typewriter_font_foundry;
279 unsigned int autosave;
281 std::string plaintext_roff_command;
283 unsigned int plaintext_linelen;
284 /// use library instead of process
287 std::string isp_command;
288 /// Accept compound words in spellchecker?
289 bool isp_accept_compound;
290 /// Pass input encoding switch to ispell?
291 bool isp_use_input_encoding;
292 /// Use alternate language?
293 bool isp_use_alt_lang;
294 /// Use personal dictionary?
295 bool isp_use_pers_dict;
298 /// Use pixmap cache?
299 bool use_pixmap_cache;
300 /// Use escape chars?
301 bool isp_use_esc_chars;
302 /// Alternate language for ispell
303 std::string isp_alt_lang;
304 /// Alternate personal dictionary file for ispell
305 std::string isp_pers_dict;
306 /// Escape characters
307 std::string isp_esc_chars;
311 std::string primary_kbmap;
313 std::string secondary_kbmap;
315 std::string lyxpipes;
317 std::string date_insert_format;
319 std::string language_package;
321 bool language_auto_begin;
323 bool language_auto_end;
325 std::string language_command_begin;
327 std::string language_command_end;
329 std::string language_command_local;
331 bool language_global_options;
333 bool language_use_babel;
339 bool mark_foreign_language;
341 std::string default_language;
343 bool cursor_follows_scrollbar;
345 bool show_macro_label;
347 bool dialogs_iconify_with_main;
349 int label_init_length;
351 ///graphics::DisplayType
352 int display_graphics;
362 PreviewStatus preview;
364 bool preview_hashed_labels;
366 std::string preview_scale_factor;
368 std::string user_name;
370 std::string user_email;
371 /// True if the TeX engine cannot handle posix paths
372 bool windows_style_tex_paths;
373 /// True if the TeX engine can handle file names containing spaces
374 bool tex_allows_spaces;
375 /** Prepend paths to the PATH environment variable.
376 * The string is input, stored and output in native format.
378 std::string path_prefix;
379 /// Use the cache for file converters?
380 bool use_converter_cache;
381 /// The maximum age of cache files in seconds
382 unsigned int converter_cache_maxage;
383 /// Sort layouts alphabetically
388 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
389 * It can be forward-declared and passed as a function argument without
390 * having to expose LyXRC.h.
392 class LyXRC_PreviewStatus {
393 LyXRC::PreviewStatus val_;
395 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
396 operator LyXRC::PreviewStatus() const { return val_; }
403 extern LyXRC system_lyxrc;