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.
22 #include "graphics/GraphicsTypes.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,
142 RC_VIEWDVI_PAPEROPTION,
152 int read(support::FileName const & filename);
154 int read(std::istream &);
160 void write(support::FileName const & filename,
161 bool ignore_system_lyxrc) const;
162 /// write rc. If a specific tag is given, only output that one.
163 void write(std::ostream & os,
164 bool ignore_system_lyxrc,
165 std::string const & tag = std::string()) const;
168 // FIXME unused (was used for xforms. Do we still need this?)
169 //static docstring const getDescription(LyXRCTags);
171 std::string bind_file;
173 std::string def_file;
179 std::string print_command;
181 std::string print_evenpage_flag;
183 std::string print_oddpage_flag;
185 std::string print_pagerange_flag;
187 std::string print_copies_flag;
189 std::string print_collcopies_flag;
191 std::string print_reverse_flag;
193 std::string print_landscape_flag;
195 std::string print_to_printer;
197 bool print_adapt_output;
199 std::string print_to_file;
201 std::string print_file_extension;
203 std::string print_extra_options;
205 std::string print_spool_command;
207 std::string print_spool_printerprefix;
209 std::string print_paper_flag;
211 std::string print_paper_dimension_flag;
213 std::string custom_export_command;
215 std::string custom_export_format;
216 /// option for telling the dvi viewer about the paper size
217 std::string view_dvi_paper_option;
218 /// default paper size for local xdvi/dvips/ghostview/whatever
219 PAPER_SIZE default_papersize;
220 /// command to run chktex incl. options
221 std::string chktex_command;
222 /// command to run bibtex incl. options
223 std::string bibtex_command;
224 /// command to run makeindex incl. options or other index programs
225 std::string index_command;
227 std::string document_path;
229 std::string template_path;
231 std::string tempdir_path;
233 bool auto_region_delete;
234 /// flag telling whether lastfiles should be checked for existance
235 bool auto_reset_options;
237 bool check_lastfiles;
238 /// maximal number of lastfiles
239 unsigned int num_lastfiles;
240 /// whether or not go to saved position when opening a file
241 bool use_lastfilepos;
242 /// load files from last session automatically
244 /// shall a backup file be created
246 /// A directory for storing backup files
247 std::string backupdir_path;
248 /// Width of MainWindow. if 0, value from last session will be used
250 /// Height of MainWindow, if 0, value from last session will be used
252 /// Whether or not save/restore windows position as session info
253 bool geometry_xysaved;
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 escape chars?
295 bool isp_use_esc_chars;
296 /// Alternate language for ispell
297 std::string isp_alt_lang;
298 /// Alternate personal dictionary file for ispell
299 std::string isp_pers_dict;
300 /// Escape characters
301 std::string isp_esc_chars;
305 std::string primary_kbmap;
307 std::string secondary_kbmap;
309 std::string lyxpipes;
311 std::string date_insert_format;
313 std::string language_package;
315 bool language_auto_begin;
317 bool language_auto_end;
319 std::string language_command_begin;
321 std::string language_command_end;
323 std::string language_command_local;
325 bool language_global_options;
327 bool language_use_babel;
333 bool mark_foreign_language;
335 std::string default_language;
337 bool cursor_follows_scrollbar;
339 bool dialogs_iconify_with_main;
341 int label_init_length;
343 graphics::DisplayType display_graphics;
353 PreviewStatus preview;
355 bool preview_hashed_labels;
357 std::string preview_scale_factor;
359 std::string user_name;
361 std::string user_email;
362 /// True if the TeX engine cannot handle posix paths
363 bool windows_style_tex_paths;
364 /// True if the TeX engine can handle file names containing spaces
365 bool tex_allows_spaces;
366 /** Prepend paths to the PATH environment variable.
367 * The string is input, stored and output in native format.
369 std::string path_prefix;
370 /// Use the cache for file converters?
371 bool use_converter_cache;
372 /// The maximum age of cache files in seconds
373 unsigned int converter_cache_maxage;
377 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
378 * It can be forward-declared and passed as a function argument without
379 * having to expose LyXRC.h.
381 class LyXRC_PreviewStatus {
382 LyXRC::PreviewStatus val_;
384 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
385 operator LyXRC::PreviewStatus() const { return val_; }
392 extern LyXRC system_lyxrc;