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 readBindFileIfNeeded();
135 void write(string const & filename) const;
139 void output(std::ostream & os) const;
141 static string const getDescription(LyXRCTags);
149 string print_command;
151 string print_evenpage_flag;
153 string print_oddpage_flag;
155 string print_pagerange_flag;
157 string print_copies_flag;
159 string print_collcopies_flag;
161 string print_reverse_flag;
163 string print_landscape_flag;
165 string print_to_printer;
167 bool print_adapt_output;
169 string print_to_file;
171 string print_file_extension;
173 string print_extra_options;
175 string print_spool_command;
177 string print_spool_printerprefix;
179 string print_paper_flag;
181 string print_paper_dimension_flag;
183 string custom_export_command;
185 string custom_export_format;
188 /// postscript interpreter (in general "gs", if it is installed)
190 /// option for telling the dvi viewer about the paper size
191 string view_dvi_paper_option;
192 /// default paper size for local xdvi/dvips/ghostview/whatever
193 BufferParams::PAPER_SIZE default_papersize;
194 /// command to run chktex incl. options
195 string chktex_command;
197 string document_path;
199 string template_path;
205 bool auto_region_delete;
206 /// flag telling whether lastfiles should be checked for existance
207 bool check_lastfiles;
208 /// filename for lastfiles file
210 /// maximal number of lastfiles
211 unsigned int num_lastfiles;
212 /// shall a backup file be created
214 /// A directory for storing backup files
215 string backupdir_path;
216 /// Zoom factor for screen fonts
218 /// parameter for button_4 and button_5 (scrollwheel)
219 unsigned int wheel_jump;
220 /// Screen font sizes in points for each font size
221 float font_sizes[10];
222 /// Allow the use of scalable fonts? Default is yes.
223 bool use_scalable_fonts;
226 /// Whether lyx should handle deadkeys by itself
227 bool override_x_deadkeys;
231 string roman_font_name;
233 string sans_font_name;
235 string typewriter_font_name;
237 string menu_font_name;
239 string popup_font_name;
256 FontEncoding font_norm_type;
258 void set_font_norm_type();
260 string font_norm_menu;
262 unsigned int autosave;
272 string ascii_roff_command;
274 unsigned int ascii_linelen;
277 /// Accept compound words in spellchecker?
278 bool isp_accept_compound;
279 /// Pass input encoding switch to ispell?
280 bool isp_use_input_encoding;
281 /// Use alternate language?
282 bool isp_use_alt_lang;
283 /// Use personal dictionary?
284 bool isp_use_pers_dict;
285 /// Use escape chars?
286 bool isp_use_esc_chars;
287 /// Alternate language for ispell
289 /// Alternate personal dictionary file for ispell
290 string isp_pers_dict;
291 /// Escape characters
292 string isp_esc_chars;
295 /// Ask for confirmation of exit when there are unsaved documents?
296 bool exit_confirmation;
297 /// Should we display short-cut information in the minibuffer?
298 bool display_shortcuts;
300 string primary_kbmap;
302 string secondary_kbmap;
306 string date_insert_format;
308 string language_package;
310 bool language_auto_begin;
312 bool language_auto_end;
314 string language_command_begin;
316 string language_command_end;
322 bool mark_foreign_language;
325 /// Do we have to use a GUI?
328 bool new_ask_filename;
330 string default_language;
332 bool cursor_follows_scrollbar;
334 int label_init_length;
336 /// Is a bind file already (or currently) read?
339 int ReadBindFile(string const & name);
345 extern LyXRC system_lyxrc;