2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
19 #include "bufferparams.h" // Just to get the enum BufferParams::PAPER_SIZE (sic)
21 // #include <boost/utility.hpp>
23 /// This contains the runtime configuration of LyX
24 class LyXRC //: public noncopyable {
25 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
26 // noncopyable again. For now I want to minimise changes. ARRae 20001010
35 RC_PRINTPAGERANGEFLAG,
37 RC_PRINTCOLLCOPIESFLAG,
39 RC_PRINTLANDSCAPEFLAG,
43 RC_PRINTFILEEXTENSION,
44 RC_PRINTEXSTRAOPTIONS,
45 RC_PRINTSPOOL_COMMAND,
46 RC_PRINTSPOOL_PRINTERPREFIX,
48 RC_PRINTPAPERDIMENSIONFLAG,
49 RC_CUSTOM_EXPORT_COMMAND,
50 RC_CUSTOM_EXPORT_FORMAT,
56 RC_SCREEN_FONT_TYPEWRITER,
59 RC_SCREEN_FONT_ENCODING,
60 RC_SCREEN_FONT_ENCODING_MENU,
70 RC_OVERRIDE_X_DEADKEYS,
82 RC_VIEWDVI_PAPEROPTION,
91 RC_SCREEN_FONT_SCALABLE,
96 RC_CURSOR_FOLLOWS_SCROLLBAR,
97 RC_DIALOGS_ICONIFY_WITH_MAIN,
104 RC_MARK_FOREIGN_LANGUAGE,
106 RC_LANGUAGE_AUTO_BEGIN,
107 RC_LANGUAGE_AUTO_END,
108 RC_LANGUAGE_COMMAND_BEGIN,
109 RC_LANGUAGE_COMMAND_END,
110 RC_LANGUAGE_COMMAND_LOCAL,
111 RC_LANGUAGE_GLOBAL_OPTIONS,
112 RC_LANGUAGE_USE_BABEL,
113 RC_DATE_INSERT_FORMAT,
121 RC_LABEL_INIT_LENGTH,
135 int read (string const & filename);
137 void readBindFileIfNeeded();
139 void write(string const & filename) const;
143 void output(std::ostream & os) const;
145 static string const getDescription(LyXRCTags);
153 string print_command;
155 string print_evenpage_flag;
157 string print_oddpage_flag;
159 string print_pagerange_flag;
161 string print_copies_flag;
163 string print_collcopies_flag;
165 string print_reverse_flag;
167 string print_landscape_flag;
169 string print_to_printer;
171 bool print_adapt_output;
173 string print_to_file;
175 string print_file_extension;
177 string print_extra_options;
179 string print_spool_command;
181 string print_spool_printerprefix;
183 string print_paper_flag;
185 string print_paper_dimension_flag;
187 string custom_export_command;
189 string custom_export_format;
192 /// postscript interpreter (in general "gs", if it is installed)
194 /// option for telling the dvi viewer about the paper size
195 string view_dvi_paper_option;
196 /// default paper size for local xdvi/dvips/ghostview/whatever
197 BufferParams::PAPER_SIZE default_papersize;
198 /// command to run chktex incl. options
199 string chktex_command;
201 string document_path;
203 string template_path;
209 bool auto_region_delete;
210 /// flag telling whether lastfiles should be checked for existance
211 bool check_lastfiles;
212 /// filename for lastfiles file
214 /// maximal number of lastfiles
215 unsigned int num_lastfiles;
216 /// shall a backup file be created
218 /// A directory for storing backup files
219 string backupdir_path;
220 /// Zoom factor for screen fonts
222 /// parameter for button_4 and button_5 (scrollwheel)
223 unsigned int wheel_jump;
224 /// Screen font sizes in points for each font size
225 float font_sizes[10];
226 /// Allow the use of scalable fonts? Default is yes.
227 bool use_scalable_fonts;
230 /// Whether lyx should handle deadkeys by itself
231 bool override_x_deadkeys;
235 string roman_font_name;
237 string sans_font_name;
239 string typewriter_font_name;
241 string menu_font_name;
243 string popup_font_name;
262 FontEncoding font_norm_type;
264 void set_font_norm_type();
266 string font_norm_menu;
268 unsigned int autosave;
270 string ascii_roff_command;
272 unsigned int ascii_linelen;
278 /// Accept compound words in spellchecker?
279 bool isp_accept_compound;
280 /// Pass input encoding switch to ispell?
281 bool isp_use_input_encoding;
282 /// Use alternate language?
283 bool isp_use_alt_lang;
284 /// Use personal dictionary?
285 bool isp_use_pers_dict;
286 /// Use escape chars?
287 bool isp_use_esc_chars;
288 /// Alternate language for ispell
290 /// Alternate personal dictionary file for ispell
291 string isp_pers_dict;
292 /// Escape characters
293 string isp_esc_chars;
296 /// Ask for confirmation of exit when there are unsaved documents?
297 bool exit_confirmation;
298 /// Should we display short-cut information in the minibuffer?
299 bool display_shortcuts;
301 string primary_kbmap;
303 string secondary_kbmap;
307 string date_insert_format;
309 string language_package;
311 bool language_auto_begin;
313 bool language_auto_end;
315 string language_command_begin;
317 string language_command_end;
319 string language_command_local;
321 bool language_global_options;
323 bool language_use_babel;
329 bool mark_foreign_language;
332 /// Do we have to use a GUI?
335 bool new_ask_filename;
337 string default_language;
339 bool cursor_follows_scrollbar;
341 bool dialogs_iconify_with_main;
343 int label_init_length;
345 string display_graphics;
347 /// Is a bind file already (or currently) read?
350 int ReadBindFile(string const & name);
356 extern LyXRC system_lyxrc;