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,
103 RC_MARK_FOREIGN_LANGUAGE,
105 RC_LANGUAGE_AUTO_BEGIN,
106 RC_LANGUAGE_AUTO_END,
107 RC_LANGUAGE_COMMAND_BEGIN,
108 RC_LANGUAGE_COMMAND_END,
109 RC_LANGUAGE_COMMAND_LOCAL,
110 RC_LANGUAGE_GLOBAL_OPTIONS,
111 RC_LANGUAGE_USE_BABEL,
112 RC_DATE_INSERT_FORMAT,
120 RC_LABEL_INIT_LENGTH,
133 int read (string const & filename);
135 void readBindFileIfNeeded();
137 void write(string const & filename) const;
141 void output(std::ostream & os) const;
143 static string const getDescription(LyXRCTags);
151 string print_command;
153 string print_evenpage_flag;
155 string print_oddpage_flag;
157 string print_pagerange_flag;
159 string print_copies_flag;
161 string print_collcopies_flag;
163 string print_reverse_flag;
165 string print_landscape_flag;
167 string print_to_printer;
169 bool print_adapt_output;
171 string print_to_file;
173 string print_file_extension;
175 string print_extra_options;
177 string print_spool_command;
179 string print_spool_printerprefix;
181 string print_paper_flag;
183 string print_paper_dimension_flag;
185 string custom_export_command;
187 string custom_export_format;
190 /// postscript interpreter (in general "gs", if it is installed)
192 /// option for telling the dvi viewer about the paper size
193 string view_dvi_paper_option;
194 /// default paper size for local xdvi/dvips/ghostview/whatever
195 BufferParams::PAPER_SIZE default_papersize;
196 /// command to run chktex incl. options
197 string chktex_command;
199 string document_path;
201 string template_path;
207 bool auto_region_delete;
208 /// flag telling whether lastfiles should be checked for existance
209 bool check_lastfiles;
210 /// filename for lastfiles file
212 /// maximal number of lastfiles
213 unsigned int num_lastfiles;
214 /// shall a backup file be created
216 /// A directory for storing backup files
217 string backupdir_path;
218 /// Zoom factor for screen fonts
220 /// parameter for button_4 and button_5 (scrollwheel)
221 unsigned int wheel_jump;
222 /// Screen font sizes in points for each font size
223 float font_sizes[10];
224 /// Allow the use of scalable fonts? Default is yes.
225 bool use_scalable_fonts;
228 /// Whether lyx should handle deadkeys by itself
229 bool override_x_deadkeys;
233 string roman_font_name;
235 string sans_font_name;
237 string typewriter_font_name;
239 string menu_font_name;
241 string popup_font_name;
260 FontEncoding font_norm_type;
262 void set_font_norm_type();
264 string font_norm_menu;
266 unsigned int autosave;
268 string ascii_roff_command;
270 unsigned int ascii_linelen;
276 /// Accept compound words in spellchecker?
277 bool isp_accept_compound;
278 /// Pass input encoding switch to ispell?
279 bool isp_use_input_encoding;
280 /// Use alternate language?
281 bool isp_use_alt_lang;
282 /// Use personal dictionary?
283 bool isp_use_pers_dict;
284 /// Use escape chars?
285 bool isp_use_esc_chars;
286 /// Alternate language for ispell
288 /// Alternate personal dictionary file for ispell
289 string isp_pers_dict;
290 /// Escape characters
291 string isp_esc_chars;
294 /// Ask for confirmation of exit when there are unsaved documents?
295 bool exit_confirmation;
296 /// Should we display short-cut information in the minibuffer?
297 bool display_shortcuts;
299 string primary_kbmap;
301 string secondary_kbmap;
305 string date_insert_format;
307 string language_package;
309 bool language_auto_begin;
311 bool language_auto_end;
313 string language_command_begin;
315 string language_command_end;
317 string language_command_local;
319 bool language_global_options;
321 bool language_use_babel;
327 bool mark_foreign_language;
330 /// Do we have to use a GUI?
333 bool new_ask_filename;
335 string default_language;
337 bool cursor_follows_scrollbar;
339 int label_init_length;
341 /// Is a bind file already (or currently) read?
344 int ReadBindFile(string const & name);
350 extern LyXRC system_lyxrc;