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"
31 namespace support
{ class FileName
; }
35 /// This contains the runtime configuration of LyX
40 RC_ACCEPT_COMPOUND
= 1,
42 RC_AUTOCORRECTION_MATH
,
48 RC_BIBTEX_ALTERNATIVES
,
53 RC_COMPLETION_CURSOR_TEXT
,
54 RC_COMPLETION_INLINE_DELAY
,
55 RC_COMPLETION_INLINE_MATH
,
56 RC_COMPLETION_INLINE_TEXT
,
57 RC_COMPLETION_INLINE_DOTS
,
58 RC_COMPLETION_POPUP_DELAY
,
59 RC_COMPLETION_POPUP_MATH
,
60 RC_COMPLETION_POPUP_TEXT
,
61 RC_COMPLETION_POPUP_AFTER_COMPLETE
,
63 RC_CONVERTER_CACHE_MAXAGE
,
65 RC_CURSOR_FOLLOWS_SCROLLBAR
,
66 RC_DATE_INSERT_FORMAT
,
68 RC_DEFAULT_VIEW_FORMAT
,
71 RC_DIALOGS_ICONIFY_WITH_MAIN
,
79 RC_FULL_SCREEN_SCROLLBAR
,
80 RC_FULL_SCREEN_TABBAR
,
81 RC_FULL_SCREEN_MENUBAR
,
82 RC_FULL_SCREEN_TOOLBARS
,
87 RC_INDEX_ALTERNATIVES
,
96 RC_LANGUAGE_AUTO_BEGIN
,
98 RC_LANGUAGE_COMMAND_BEGIN
,
99 RC_LANGUAGE_COMMAND_END
,
100 RC_LANGUAGE_COMMAND_LOCAL
,
101 RC_LANGUAGE_GLOBAL_OPTIONS
,
103 RC_LANGUAGE_USE_BABEL
,
106 RC_MAC_LIKE_WORD_MOVEMENT
,
108 RC_MARK_FOREIGN_LANGUAGE
,
109 RC_MOUSE_WHEEL_SPEED
,
112 RC_OPEN_BUFFERS_IN_TABS
,
115 RC_PLAINTEXT_LINELEN
,
116 RC_PLAINTEXT_ROFF_COMMAND
,
118 RC_PREVIEW_HASHED_LABELS
,
119 RC_PREVIEW_SCALE_FACTOR
,
120 RC_PRINTCOLLCOPIESFLAG
,
123 RC_PRINTEVENPAGEFLAG
,
124 RC_PRINTEXSTRAOPTIONS
,
125 RC_PRINTFILEEXTENSION
,
126 RC_PRINTLANDSCAPEFLAG
,
128 RC_PRINTPAGERANGEFLAG
,
129 RC_PRINTPAPERDIMENSIONFLAG
,
132 RC_PRINTSPOOL_COMMAND
,
133 RC_PRINTSPOOL_PRINTERPREFIX
,
136 RC_PRINT_ADAPTOUTPUT
,
140 RC_SCREEN_FONT_ROMAN
,
141 RC_SCREEN_FONT_ROMAN_FOUNDRY
,
143 RC_SCREEN_FONT_SANS_FOUNDRY
,
144 RC_SCREEN_FONT_SCALABLE
,
145 RC_SCREEN_FONT_SIZES
,
146 RC_SCREEN_FONT_TYPEWRITER
,
147 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY
,
149 RC_SCROLL_BELOW_DOCUMENT
,
155 RC_SPELLCHECK_CONTINUOUSLY
,
156 RC_SPLITINDEX_COMMAND
,
159 RC_TEX_ALLOWS_SPACES
,
160 RC_TEX_EXPECTS_WINDOWS_PATHS
,
168 RC_USE_CONVERTER_CACHE
,
175 RC_VIEWDVI_PAPEROPTION
,
186 int read(support::FileName
const & filename
);
188 int read(std::istream
&);
194 void write(support::FileName
const & filename
,
195 bool ignore_system_lyxrc
) const;
196 /// write rc. If a specific tag is given, only output that one.
197 void write(std::ostream
& os
,
198 bool ignore_system_lyxrc
,
199 std::string
const & tag
= std::string()) const;
202 // FIXME unused (was used for xforms. Do we still need this?)
203 //static docstring const getDescription(LyXRCTags);
205 std::string bind_file
;
207 std::string def_file
;
213 std::string print_command
;
215 std::string print_evenpage_flag
;
217 std::string print_oddpage_flag
;
219 std::string print_pagerange_flag
;
221 std::string print_copies_flag
;
223 std::string print_collcopies_flag
;
225 std::string print_reverse_flag
;
227 std::string print_landscape_flag
;
229 std::string print_to_printer
;
231 bool print_adapt_output
;
233 std::string print_to_file
;
235 std::string print_file_extension
;
237 std::string print_extra_options
;
239 std::string print_spool_command
;
241 std::string print_spool_printerprefix
;
243 std::string print_paper_flag
;
245 std::string print_paper_dimension_flag
;
246 /// option for telling the dvi viewer about the paper size
247 std::string view_dvi_paper_option
;
248 /// default paper size for local xdvi/dvips/ghostview/whatever
249 PAPER_SIZE default_papersize
;
250 /// command to run chktex incl. options
251 std::string chktex_command
;
252 /// all available commands to run bibtex incl. options
253 std::set
<std::string
> bibtex_alternatives
;
254 /// command to run bibtex incl. options
255 std::string bibtex_command
;
256 /// command to run japanese bibtex incl. options
257 std::string jbibtex_command
;
258 /// all available index commands incl. options
259 std::set
<std::string
> index_alternatives
;
260 /// command to run makeindex incl. options or other index programs
261 std::string index_command
;
262 /// command to run japanese index program incl. options
263 std::string jindex_command
;
264 /// command to generate multiple indices
265 std::string splitindex_command
;
266 /// command to run makeindex incl. options for nomencl
267 std::string nomencl_command
;
269 std::string document_path
;
271 std::string example_path
;
273 std::string template_path
;
275 std::string tempdir_path
;
277 std::string thesaurusdir_path
;
279 bool auto_region_delete
;
280 /// flag telling whether lastfiles should be checked for existance
281 bool auto_reset_options
;
283 bool check_lastfiles
;
284 /// maximal number of lastfiles
285 unsigned int num_lastfiles
;
286 /// whether or not go to saved position when opening a file
287 bool use_lastfilepos
;
288 /// load files from last session automatically
290 /// shall a backup file be created
292 /// A directory for storing backup files
293 std::string backupdir_path
;
294 /// Whether or not save/restore session information
295 /// like windows position and geometry.
296 bool allow_geometry_session
;
297 /// Scrolling speed of the mouse wheel
298 double mouse_wheel_speed
;
299 /// Zoom factor for screen fonts
301 /// Screen font sizes in points for each font size
302 std::string font_sizes
[10];
303 /// Allow the use of scalable fonts? Default is yes.
304 bool use_scalable_fonts
;
310 std::string roman_font_name
;
312 std::string sans_font_name
;
314 std::string typewriter_font_name
;
316 std::string roman_font_foundry
;
318 std::string sans_font_foundry
;
320 std::string typewriter_font_foundry
;
322 unsigned int autosave
;
324 unsigned int plaintext_linelen
;
325 /// Accept compound words in spellchecker?
326 bool spellchecker_accept_compound
;
329 /// Use pixmap cache?
330 bool use_pixmap_cache
;
331 /// Alternate language for spellchecker
332 std::string spellchecker_alt_lang
;
333 /// Escape characters
334 std::string spellchecker_esc_chars
;
335 /// spellcheck continuously?
336 bool spellcheck_continuously
;
340 std::string primary_kbmap
;
342 std::string secondary_kbmap
;
344 std::string lyxpipes
;
346 std::string date_insert_format
;
348 std::string language_package
;
350 bool language_auto_begin
;
352 bool language_auto_end
;
354 std::string language_command_begin
;
356 std::string language_command_end
;
358 std::string language_command_local
;
360 bool language_global_options
;
362 bool language_use_babel
;
365 /// bidi cursor movement: true = visual, false = logical
370 bool mark_foreign_language
;
372 std::string default_language
;
374 std::string gui_language
;
376 std::string default_view_format
;
378 bool mac_like_word_movement
;
380 bool cursor_follows_scrollbar
;
382 bool scroll_below_document
;
384 enum MacroEditStyle
{
385 MACRO_EDIT_INLINE_BOX
= 0,
390 MacroEditStyle macro_edit_style
;
392 bool dialogs_iconify_with_main
;
394 int label_init_length
;
396 bool display_graphics
;
406 PreviewStatus preview
;
408 bool preview_hashed_labels
;
410 std::string preview_scale_factor
;
412 std::string user_name
;
414 std::string user_email
;
415 /// True if the TeX engine cannot handle posix paths
416 bool windows_style_tex_paths
;
417 /// True if the TeX engine can handle file names containing spaces
418 bool tex_allows_spaces
;
419 /** Prepend paths to the PATH environment variable.
420 * The string is input, stored and output in native format.
422 std::string path_prefix
;
423 /// Use the cache for file converters?
424 bool use_converter_cache
;
425 /// The maximum age of cache files in seconds
426 unsigned int converter_cache_maxage
;
427 /// Sort layouts alphabetically
429 /// Group layout by their category
431 /// Toggle toolbars in fullscreen mode?
432 bool full_screen_toolbars
;
433 /// Toggle scrollbar in fullscreen mode?
434 bool full_screen_scrollbar
;
435 /// Toggle tabbar in fullscreen mode?
436 bool full_screen_tabbar
;
437 /// Toggle menubar in fullscreen mode?
438 bool full_screen_menubar
;
439 /// Limit the text width?
440 bool full_screen_limit
;
441 /// Width of limited screen (in pixels) in fullscreen mode
442 int full_screen_width
;
444 bool completion_cursor_text
;
446 double completion_inline_delay
;
448 bool completion_inline_math
;
450 bool completion_inline_text
;
452 int completion_inline_dots
;
454 bool autocorrection_math
;
456 double completion_popup_delay
;
458 bool completion_popup_math
;
460 bool completion_popup_text
;
462 bool completion_popup_after_complete
;
464 bool open_buffers_in_tabs
;
468 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
469 * It can be forward-declared and passed as a function argument without
470 * having to expose LyXRC.h.
472 class LyXRC_PreviewStatus
{
473 LyXRC::PreviewStatus val_
;
475 LyXRC_PreviewStatus(LyXRC::PreviewStatus val
) : val_(val
) {}
476 operator LyXRC::PreviewStatus() const { return val_
; }
483 extern LyXRC system_lyxrc
;
485 // used by at least frontends/qt4/GuiPref.cpp
486 const long maxlastfiles
= 20;