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,
70 RC_FULL_SCREEN_SCROLLBAR,
71 RC_FULL_SCREEN_TABBAR,
72 RC_FULL_SCREEN_TOOLBARS,
80 RC_LANGUAGE_AUTO_BEGIN,
82 RC_LANGUAGE_COMMAND_BEGIN,
83 RC_LANGUAGE_COMMAND_END,
84 RC_LANGUAGE_COMMAND_LOCAL,
85 RC_LANGUAGE_GLOBAL_OPTIONS,
87 RC_LANGUAGE_USE_BABEL,
93 RC_MARK_FOREIGN_LANGUAGE,
99 RC_PREVIEW_HASHED_LABELS,
100 RC_PREVIEW_SCALE_FACTOR,
101 RC_PRINTCOLLCOPIESFLAG,
104 RC_PRINTEVENPAGEFLAG,
105 RC_PRINTEXSTRAOPTIONS,
106 RC_PRINTFILEEXTENSION,
107 RC_PRINTLANDSCAPEFLAG,
109 RC_PRINTPAGERANGEFLAG,
110 RC_PRINTPAPERDIMENSIONFLAG,
113 RC_PRINTSPOOL_COMMAND,
114 RC_PRINTSPOOL_PRINTERPREFIX,
117 RC_PRINT_ADAPTOUTPUT,
121 RC_SCREEN_FONT_ROMAN,
122 RC_SCREEN_FONT_ROMAN_FOUNDRY,
124 RC_SCREEN_FONT_SANS_FOUNDRY,
125 RC_SCREEN_FONT_SCALABLE,
126 RC_SCREEN_FONT_SIZES,
127 RC_SCREEN_FONT_TYPEWRITER,
128 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
137 RC_TEX_ALLOWS_SPACES,
138 RC_TEX_EXPECTS_WINDOWS_PATHS,
144 RC_USE_CONVERTER_CACHE,
151 RC_VIEWDVI_PAPEROPTION,
162 int read(support::FileName const & filename);
164 int read(std::istream &);
170 void write(support::FileName const & filename,
171 bool ignore_system_lyxrc) const;
172 /// write rc. If a specific tag is given, only output that one.
173 void write(std::ostream & os,
174 bool ignore_system_lyxrc,
175 std::string const & tag = std::string()) const;
178 // FIXME unused (was used for xforms. Do we still need this?)
179 //static docstring const getDescription(LyXRCTags);
181 std::string bind_file;
183 std::string def_file;
189 std::string print_command;
191 std::string print_evenpage_flag;
193 std::string print_oddpage_flag;
195 std::string print_pagerange_flag;
197 std::string print_copies_flag;
199 std::string print_collcopies_flag;
201 std::string print_reverse_flag;
203 std::string print_landscape_flag;
205 std::string print_to_printer;
207 bool print_adapt_output;
209 std::string print_to_file;
211 std::string print_file_extension;
213 std::string print_extra_options;
215 std::string print_spool_command;
217 std::string print_spool_printerprefix;
219 std::string print_paper_flag;
221 std::string print_paper_dimension_flag;
223 std::string custom_export_command;
225 std::string custom_export_format;
226 /// option for telling the dvi viewer about the paper size
227 std::string view_dvi_paper_option;
228 /// default paper size for local xdvi/dvips/ghostview/whatever
229 PAPER_SIZE default_papersize;
230 /// command to run chktex incl. options
231 std::string chktex_command;
232 /// command to run bibtex incl. options
233 std::string bibtex_command;
234 /// command to run makeindex incl. options or other index programs
235 std::string index_command;
237 std::string document_path;
239 std::string example_path;
241 std::string template_path;
243 std::string tempdir_path;
245 bool auto_region_delete;
246 /// flag telling whether lastfiles should be checked for existance
247 bool auto_reset_options;
249 bool check_lastfiles;
250 /// maximal number of lastfiles
251 unsigned int num_lastfiles;
252 /// whether or not go to saved position when opening a file
253 bool use_lastfilepos;
254 /// load files from last session automatically
256 /// shall a backup file be created
258 /// A directory for storing backup files
259 std::string backupdir_path;
260 /// Whether or not save/restore session information
261 /// like windows position and geometry.
262 bool allow_geometry_session;
263 /// Scrolling speed of the mouse wheel
264 double mouse_wheel_speed;
265 /// Zoom factor for screen fonts
267 /// Screen font sizes in points for each font size
268 std::string font_sizes[10];
269 /// Allow the use of scalable fonts? Default is yes.
270 bool use_scalable_fonts;
276 std::string roman_font_name;
278 std::string sans_font_name;
280 std::string typewriter_font_name;
282 std::string roman_font_foundry;
284 std::string sans_font_foundry;
286 std::string typewriter_font_foundry;
288 unsigned int autosave;
290 std::string plaintext_roff_command;
292 unsigned int plaintext_linelen;
293 /// use library instead of process
296 std::string isp_command;
297 /// Accept compound words in spellchecker?
298 bool isp_accept_compound;
299 /// Pass input encoding switch to ispell?
300 bool isp_use_input_encoding;
301 /// Use alternate language?
302 bool isp_use_alt_lang;
303 /// Use personal dictionary?
304 bool isp_use_pers_dict;
307 /// Use pixmap cache?
308 bool use_pixmap_cache;
309 /// Use escape chars?
310 bool isp_use_esc_chars;
311 /// Alternate language for ispell
312 std::string isp_alt_lang;
313 /// Alternate personal dictionary file for ispell
314 std::string isp_pers_dict;
315 /// Escape characters
316 std::string isp_esc_chars;
320 std::string primary_kbmap;
322 std::string secondary_kbmap;
324 std::string lyxpipes;
326 std::string date_insert_format;
328 std::string language_package;
330 bool language_auto_begin;
332 bool language_auto_end;
334 std::string language_command_begin;
336 std::string language_command_end;
338 std::string language_command_local;
340 bool language_global_options;
342 bool language_use_babel;
345 /// bidi cursor movement: true = visual, false = logical
350 bool mark_foreign_language;
352 std::string default_language;
354 bool cursor_follows_scrollbar;
356 enum MacroEditStyle {
357 MACRO_EDIT_INLINE_BOX = 0,
362 MacroEditStyle macro_edit_style;
364 bool dialogs_iconify_with_main;
366 int label_init_length;
368 ///graphics::DisplayType
369 int display_graphics;
379 PreviewStatus preview;
381 bool preview_hashed_labels;
383 std::string preview_scale_factor;
385 std::string user_name;
387 std::string user_email;
388 /// True if the TeX engine cannot handle posix paths
389 bool windows_style_tex_paths;
390 /// True if the TeX engine can handle file names containing spaces
391 bool tex_allows_spaces;
392 /** Prepend paths to the PATH environment variable.
393 * The string is input, stored and output in native format.
395 std::string path_prefix;
396 /// Use the cache for file converters?
397 bool use_converter_cache;
398 /// The maximum age of cache files in seconds
399 unsigned int converter_cache_maxage;
400 /// Sort layouts alphabetically
402 /// Toggle toolbars in fullscreen mode?
403 bool full_screen_toolbars;
404 /// Toggle scrollbar in fullscreen mode?
405 bool full_screen_scrollbar;
406 /// Toggle tabbar in fullscreen mode?
407 bool full_screen_tabbar;
408 /// Limit the text width?
409 bool full_screen_limit;
410 /// Width of limited screen (in pixels) in fullscreen mode
411 int full_screen_width;
415 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
416 * It can be forward-declared and passed as a function argument without
417 * having to expose LyXRC.h.
419 class LyXRC_PreviewStatus {
420 LyXRC::PreviewStatus val_;
422 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
423 operator LyXRC::PreviewStatus() const { return val_; }
430 extern LyXRC system_lyxrc;