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,
130 int read (string const & filename);
132 void write(string const & filename) const;
136 void output(std::ostream & os) const;
137 /// Is a bind file already (or currently) read?
140 int ReadBindFile(string const & name = "cua");
142 static string const getDescription(LyXRCTags);
150 string print_command;
152 string print_evenpage_flag;
154 string print_oddpage_flag;
156 string print_pagerange_flag;
158 string print_copies_flag;
160 string print_collcopies_flag;
162 string print_reverse_flag;
164 string print_landscape_flag;
166 string print_to_printer;
168 bool print_adapt_output;
170 string print_to_file;
172 string print_file_extension;
174 string print_extra_options;
176 string print_spool_command;
178 string print_spool_printerprefix;
180 string print_paper_flag;
182 string print_paper_dimension_flag;
184 string custom_export_command;
186 string custom_export_format;
189 /// postscript interpreter (in general "gs", if it is installed)
191 /// option for telling the dvi viewer about the paper size
192 string view_dvi_paper_option;
193 /// default paper size for local xdvi/dvips/ghostview/whatever
194 BufferParams::PAPER_SIZE default_papersize;
195 /// command to run chktex incl. options
196 string chktex_command;
198 string document_path;
200 string template_path;
206 bool auto_region_delete;
207 /// flag telling whether lastfiles should be checked for existance
208 bool check_lastfiles;
209 /// filename for lastfiles file
211 /// maximal number of lastfiles
212 unsigned int num_lastfiles;
213 /// shall a backup file be created
215 /// A directory for storing backup files
216 string backupdir_path;
217 /// Zoom factor for screen fonts
219 /// parameter for button_4 and button_5 (scrollwheel)
220 unsigned int wheel_jump;
221 /// Screen font sizes in points for each font size
222 float font_sizes[10];
223 /// Allow the use of scalable fonts? Default is yes.
224 bool use_scalable_fonts;
227 /// Whether lyx should handle deadkeys by itself
228 bool override_x_deadkeys;
232 string roman_font_name;
234 string sans_font_name;
236 string typewriter_font_name;
238 string menu_font_name;
240 string popup_font_name;
257 FontEncoding font_norm_type;
259 void set_font_norm_type();
261 string font_norm_menu;
263 unsigned int autosave;
273 string ascii_roff_command;
275 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;
323 bool mark_foreign_language;
326 /// Do we have to use a GUI?
329 bool new_ask_filename;
331 string default_language;
333 bool cursor_follows_scrollbar;
339 extern LyXRC system_lyxrc;