2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
19 #include "bufferparams.h"
20 #include <boost/utility.hpp>
22 /// This contains the runtime configuration of LyX
23 class LyXRC //: public noncopyable {
24 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
25 // noncopyable again. For now I want to minimise changes. ARRae 20001010
34 RC_PRINTPAGERANGEFLAG,
36 RC_PRINTCOLLCOPIESFLAG,
38 RC_PRINTLANDSCAPEFLAG,
42 RC_PRINTFILEEXTENSION,
43 RC_PRINTEXSTRAOPTIONS,
44 RC_PRINTSPOOL_COMMAND,
45 RC_PRINTSPOOL_PRINTERPREFIX,
47 RC_PRINTPAPERDIMENSIONFLAG,
48 RC_CUSTOM_EXPORT_COMMAND,
49 RC_CUSTOM_EXPORT_FORMAT,
55 RC_SCREEN_FONT_TYPEWRITER,
58 RC_SCREEN_FONT_ENCODING,
59 RC_SCREEN_FONT_ENCODING_MENU,
69 RC_OVERRIDE_X_DEADKEYS,
86 RC_VIEWDVI_PAPEROPTION,
95 RC_SCREEN_FONT_SCALABLE,
100 RC_CURSOR_FOLLOWS_SCROLLBAR,
101 RC_EXIT_CONFIRMATION,
102 RC_DISPLAY_SHORTCUTS,
107 RC_MARK_FOREIGN_LANGUAGE,
109 RC_LANGUAGE_AUTO_BEGIN,
110 RC_LANGUAGE_AUTO_END,
111 RC_LANGUAGE_COMMAND_BEGIN,
112 RC_LANGUAGE_COMMAND_END,
113 RC_DATE_INSERT_FORMAT,
121 RC_LABEL_INIT_LENGTH,
131 int read (string const & filename);
133 void write(string const & filename) const;
137 void output(std::ostream & os) const;
138 /// Is a bind file already (or currently) read?
141 int ReadBindFile(string const & name = "cua");
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;
258 FontEncoding font_norm_type;
260 void set_font_norm_type();
262 string font_norm_menu;
264 unsigned int autosave;
274 string ascii_roff_command;
276 unsigned int ascii_linelen;
279 /// Accept compound words in spellchecker?
280 bool isp_accept_compound;
281 /// Pass input encoding switch to ispell?
282 bool isp_use_input_encoding;
283 /// Use alternate language?
284 bool isp_use_alt_lang;
285 /// Use personal dictionary?
286 bool isp_use_pers_dict;
287 /// Use escape chars?
288 bool isp_use_esc_chars;
289 /// Alternate language for ispell
291 /// Alternate personal dictionary file for ispell
292 string isp_pers_dict;
293 /// Escape characters
294 string isp_esc_chars;
297 /// Ask for confirmation of exit when there are unsaved documents?
298 bool exit_confirmation;
299 /// Should we display short-cut information in the minibuffer?
300 bool display_shortcuts;
302 string primary_kbmap;
304 string secondary_kbmap;
308 string date_insert_format;
310 string language_package;
312 bool language_auto_begin;
314 bool language_auto_end;
316 string language_command_begin;
318 string language_command_end;
324 bool mark_foreign_language;
327 /// Do we have to use a GUI?
330 bool new_ask_filename;
332 string default_language;
334 bool cursor_follows_scrollbar;
336 int label_init_length;
342 extern LyXRC system_lyxrc;