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,
88 RC_MARK_FOREIGN_LANGUAGE,
94 RC_PREVIEW_HASHED_LABELS,
95 RC_PREVIEW_SCALE_FACTOR,
96 RC_PRINTCOLLCOPIESFLAG,
100 RC_PRINTEXSTRAOPTIONS,
101 RC_PRINTFILEEXTENSION,
102 RC_PRINTLANDSCAPEFLAG,
104 RC_PRINTPAGERANGEFLAG,
105 RC_PRINTPAPERDIMENSIONFLAG,
108 RC_PRINTSPOOL_COMMAND,
109 RC_PRINTSPOOL_PRINTERPREFIX,
112 RC_PRINT_ADAPTOUTPUT,
116 RC_SCREEN_FONT_ROMAN,
117 RC_SCREEN_FONT_ROMAN_FOUNDRY,
119 RC_SCREEN_FONT_SANS_FOUNDRY,
120 RC_SCREEN_FONT_SCALABLE,
121 RC_SCREEN_FONT_SIZES,
122 RC_SCREEN_FONT_TYPEWRITER,
123 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
132 RC_TEX_ALLOWS_SPACES,
133 RC_TEX_EXPECTS_WINDOWS_PATHS,
139 RC_USE_CONVERTER_CACHE,
146 RC_VIEWDVI_PAPEROPTION,
157 int read(support::FileName const & filename);
159 int read(std::istream &);
165 void write(support::FileName const & filename,
166 bool ignore_system_lyxrc) const;
167 /// write rc. If a specific tag is given, only output that one.
168 void write(std::ostream & os,
169 bool ignore_system_lyxrc,
170 std::string const & tag = std::string()) const;
173 // FIXME unused (was used for xforms. Do we still need this?)
174 //static docstring const getDescription(LyXRCTags);
176 std::string bind_file;
178 std::string def_file;
184 std::string print_command;
186 std::string print_evenpage_flag;
188 std::string print_oddpage_flag;
190 std::string print_pagerange_flag;
192 std::string print_copies_flag;
194 std::string print_collcopies_flag;
196 std::string print_reverse_flag;
198 std::string print_landscape_flag;
200 std::string print_to_printer;
202 bool print_adapt_output;
204 std::string print_to_file;
206 std::string print_file_extension;
208 std::string print_extra_options;
210 std::string print_spool_command;
212 std::string print_spool_printerprefix;
214 std::string print_paper_flag;
216 std::string print_paper_dimension_flag;
218 std::string custom_export_command;
220 std::string custom_export_format;
221 /// option for telling the dvi viewer about the paper size
222 std::string view_dvi_paper_option;
223 /// default paper size for local xdvi/dvips/ghostview/whatever
224 PAPER_SIZE default_papersize;
225 /// command to run chktex incl. options
226 std::string chktex_command;
227 /// command to run bibtex incl. options
228 std::string bibtex_command;
229 /// command to run makeindex incl. options or other index programs
230 std::string index_command;
232 std::string document_path;
234 std::string example_path;
236 std::string template_path;
238 std::string tempdir_path;
240 bool auto_region_delete;
241 /// flag telling whether lastfiles should be checked for existance
242 bool auto_reset_options;
244 bool check_lastfiles;
245 /// maximal number of lastfiles
246 unsigned int num_lastfiles;
247 /// whether or not go to saved position when opening a file
248 bool use_lastfilepos;
249 /// load files from last session automatically
251 /// shall a backup file be created
253 /// A directory for storing backup files
254 std::string backupdir_path;
255 /// Whether or not save/restore session information
256 /// like windows position and geometry.
257 bool allow_geometry_session;
258 /// Scrolling speed of the mouse wheel
259 double mouse_wheel_speed;
260 /// Zoom factor for screen fonts
262 /// Screen font sizes in points for each font size
263 std::string font_sizes[10];
264 /// Allow the use of scalable fonts? Default is yes.
265 bool use_scalable_fonts;
271 std::string roman_font_name;
273 std::string sans_font_name;
275 std::string typewriter_font_name;
277 std::string roman_font_foundry;
279 std::string sans_font_foundry;
281 std::string typewriter_font_foundry;
283 unsigned int autosave;
285 std::string plaintext_roff_command;
287 unsigned int plaintext_linelen;
288 /// use library instead of process
291 std::string isp_command;
292 /// Accept compound words in spellchecker?
293 bool isp_accept_compound;
294 /// Pass input encoding switch to ispell?
295 bool isp_use_input_encoding;
296 /// Use alternate language?
297 bool isp_use_alt_lang;
298 /// Use personal dictionary?
299 bool isp_use_pers_dict;
302 /// Use pixmap cache?
303 bool use_pixmap_cache;
304 /// Use escape chars?
305 bool isp_use_esc_chars;
306 /// Alternate language for ispell
307 std::string isp_alt_lang;
308 /// Alternate personal dictionary file for ispell
309 std::string isp_pers_dict;
310 /// Escape characters
311 std::string isp_esc_chars;
315 std::string primary_kbmap;
317 std::string secondary_kbmap;
319 std::string lyxpipes;
321 std::string date_insert_format;
323 std::string language_package;
325 bool language_auto_begin;
327 bool language_auto_end;
329 std::string language_command_begin;
331 std::string language_command_end;
333 std::string language_command_local;
335 bool language_global_options;
337 bool language_use_babel;
340 /// bidi cursor movement: true = visual, false = logical
345 bool mark_foreign_language;
347 std::string default_language;
349 bool cursor_follows_scrollbar;
351 enum MacroEditStyle {
352 MACRO_EDIT_INLINE_BOX = 0,
357 MacroEditStyle macro_edit_style;
359 bool dialogs_iconify_with_main;
361 int label_init_length;
363 ///graphics::DisplayType
364 int display_graphics;
374 PreviewStatus preview;
376 bool preview_hashed_labels;
378 std::string preview_scale_factor;
380 std::string user_name;
382 std::string user_email;
383 /// True if the TeX engine cannot handle posix paths
384 bool windows_style_tex_paths;
385 /// True if the TeX engine can handle file names containing spaces
386 bool tex_allows_spaces;
387 /** Prepend paths to the PATH environment variable.
388 * The string is input, stored and output in native format.
390 std::string path_prefix;
391 /// Use the cache for file converters?
392 bool use_converter_cache;
393 /// The maximum age of cache files in seconds
394 unsigned int converter_cache_maxage;
395 /// Sort layouts alphabetically
400 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
401 * It can be forward-declared and passed as a function argument without
402 * having to expose LyXRC.h.
404 class LyXRC_PreviewStatus {
405 LyXRC::PreviewStatus val_;
407 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
408 operator LyXRC::PreviewStatus() const { return val_; }
415 extern LyXRC system_lyxrc;