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,
84 RC_VIEWDVI_PAPEROPTION,
93 RC_SCREEN_FONT_SCALABLE,
98 RC_CURSOR_FOLLOWS_SCROLLBAR,
100 RC_DISPLAY_SHORTCUTS,
105 RC_MARK_FOREIGN_LANGUAGE,
107 RC_LANGUAGE_AUTO_BEGIN,
108 RC_LANGUAGE_AUTO_END,
109 RC_LANGUAGE_COMMAND_BEGIN,
110 RC_LANGUAGE_COMMAND_END,
111 RC_DATE_INSERT_FORMAT,
128 int read (string const & filename);
130 void write(string const & filename) const;
134 void output(std::ostream & os) const;
135 /// Is a bind file already (or currently) read?
138 int ReadBindFile(string const & name = "cua");
140 static string getFeedback( LyXRCTags );
148 string print_command;
150 string print_evenpage_flag;
152 string print_oddpage_flag;
154 string print_pagerange_flag;
156 string print_copies_flag;
158 string print_collcopies_flag;
160 string print_reverse_flag;
162 string print_landscape_flag;
164 string print_to_printer;
166 bool print_adapt_output;
168 string print_to_file;
170 string print_file_extension;
172 string print_extra_options;
174 string print_spool_command;
176 string print_spool_printerprefix;
178 string print_paper_flag;
180 string print_paper_dimension_flag;
182 string custom_export_command;
184 string custom_export_format;
187 /// postscript interpreter (in general "gs", if it is installed)
189 /// option for telling the dvi viewer about the paper size
190 string view_dvi_paper_option;
191 /// default paper size for local xdvi/dvips/ghostview/whatever
192 BufferParams::PAPER_SIZE default_papersize;
193 /// command to run chktex incl. options
194 string chktex_command;
196 string document_path;
198 string template_path;
204 bool auto_region_delete;
205 /// flag telling whether lastfiles should be checked for existance
206 bool check_lastfiles;
207 /// filename for lastfiles file
209 /// maximal number of lastfiles
210 unsigned int num_lastfiles;
211 /// shall a backup file be created
213 /// A directory for storing backup files
214 string backupdir_path;
215 /// Zoom factor for screen fonts
217 /// parameter for button_4 and button_5 (scrollwheel)
218 unsigned int wheel_jump;
219 /// Screen font sizes in points for each font size
220 float font_sizes[10];
221 /// Allow the use of scalable fonts? Default is yes.
222 bool use_scalable_fonts;
225 /// Whether lyx should handle deadkeys by itself
226 bool override_x_deadkeys;
230 string roman_font_name;
232 string sans_font_name;
234 string typewriter_font_name;
236 string menu_font_name;
238 string popup_font_name;
255 FontEncoding font_norm_type;
257 void set_font_norm_type();
259 string font_norm_menu;
261 unsigned int autosave;
269 string ascii_roff_command;
271 unsigned int ascii_linelen;
274 /// Accept compound words in spellchecker?
275 bool isp_accept_compound;
276 /// Pass input encoding switch to ispell?
277 bool isp_use_input_encoding;
278 /// Use alternate language?
279 bool isp_use_alt_lang;
280 /// Use personal dictionary?
281 bool isp_use_pers_dict;
282 /// Use escape chars?
283 bool isp_use_esc_chars;
284 /// Alternate language for ispell
286 /// Alternate personal dictionary file for ispell
287 string isp_pers_dict;
288 /// Escape characters
289 string isp_esc_chars;
292 /// Ask for confirmation of exit when there are unsaved documents?
293 bool exit_confirmation;
294 /// Should we display short-cut information in the minibuffer?
295 bool display_shortcuts;
297 string primary_kbmap;
299 string secondary_kbmap;
303 string date_insert_format;
305 string language_package;
307 bool language_auto_begin;
309 bool language_auto_end;
311 string language_command_begin;
313 string language_command_end;
319 bool mark_foreign_language;
322 /// Do we have to use a GUI?
325 bool new_ask_filename;
327 string default_language;
329 bool cursor_follows_scrollbar;
335 extern LyXRC system_lyxrc;