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,
81 RC_VIEWDVI_PAPEROPTION,
90 RC_SCREEN_FONT_SCALABLE,
95 RC_CURSOR_FOLLOWS_SCROLLBAR,
102 RC_MARK_FOREIGN_LANGUAGE,
104 RC_LANGUAGE_AUTO_BEGIN,
105 RC_LANGUAGE_AUTO_END,
106 RC_LANGUAGE_COMMAND_BEGIN,
107 RC_LANGUAGE_COMMAND_END,
108 RC_DATE_INSERT_FORMAT,
116 RC_LABEL_INIT_LENGTH,
126 int read (string const & filename);
128 void readBindFileIfNeeded();
130 void write(string const & filename) const;
134 void output(std::ostream & os) const;
136 static string const getDescription(LyXRCTags);
144 string print_command;
146 string print_evenpage_flag;
148 string print_oddpage_flag;
150 string print_pagerange_flag;
152 string print_copies_flag;
154 string print_collcopies_flag;
156 string print_reverse_flag;
158 string print_landscape_flag;
160 string print_to_printer;
162 bool print_adapt_output;
164 string print_to_file;
166 string print_file_extension;
168 string print_extra_options;
170 string print_spool_command;
172 string print_spool_printerprefix;
174 string print_paper_flag;
176 string print_paper_dimension_flag;
178 string custom_export_command;
180 string custom_export_format;
183 /// postscript interpreter (in general "gs", if it is installed)
185 /// option for telling the dvi viewer about the paper size
186 string view_dvi_paper_option;
187 /// default paper size for local xdvi/dvips/ghostview/whatever
188 BufferParams::PAPER_SIZE default_papersize;
189 /// command to run chktex incl. options
190 string chktex_command;
192 string document_path;
194 string template_path;
200 bool auto_region_delete;
201 /// flag telling whether lastfiles should be checked for existance
202 bool check_lastfiles;
203 /// filename for lastfiles file
205 /// maximal number of lastfiles
206 unsigned int num_lastfiles;
207 /// shall a backup file be created
209 /// A directory for storing backup files
210 string backupdir_path;
211 /// Zoom factor for screen fonts
213 /// parameter for button_4 and button_5 (scrollwheel)
214 unsigned int wheel_jump;
215 /// Screen font sizes in points for each font size
216 float font_sizes[10];
217 /// Allow the use of scalable fonts? Default is yes.
218 bool use_scalable_fonts;
221 /// Whether lyx should handle deadkeys by itself
222 bool override_x_deadkeys;
226 string roman_font_name;
228 string sans_font_name;
230 string typewriter_font_name;
232 string menu_font_name;
234 string popup_font_name;
251 FontEncoding font_norm_type;
253 void set_font_norm_type();
255 string font_norm_menu;
257 unsigned int autosave;
259 string ascii_roff_command;
261 unsigned int ascii_linelen;
264 /// Accept compound words in spellchecker?
265 bool isp_accept_compound;
266 /// Pass input encoding switch to ispell?
267 bool isp_use_input_encoding;
268 /// Use alternate language?
269 bool isp_use_alt_lang;
270 /// Use personal dictionary?
271 bool isp_use_pers_dict;
272 /// Use escape chars?
273 bool isp_use_esc_chars;
274 /// Alternate language for ispell
276 /// Alternate personal dictionary file for ispell
277 string isp_pers_dict;
278 /// Escape characters
279 string isp_esc_chars;
282 /// Ask for confirmation of exit when there are unsaved documents?
283 bool exit_confirmation;
284 /// Should we display short-cut information in the minibuffer?
285 bool display_shortcuts;
287 string primary_kbmap;
289 string secondary_kbmap;
293 string date_insert_format;
295 string language_package;
297 bool language_auto_begin;
299 bool language_auto_end;
301 string language_command_begin;
303 string language_command_end;
309 bool mark_foreign_language;
312 /// Do we have to use a GUI?
315 bool new_ask_filename;
317 string default_language;
319 bool cursor_follows_scrollbar;
321 int label_init_length;
323 /// Is a bind file already (or currently) read?
326 int ReadBindFile(string const & name);
332 extern LyXRC system_lyxrc;