4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
9 * \author Angus Leeming
11 * \author André Pönitz
15 * Full author contact details are available in file CREDITS.
22 #include "graphics/GraphicsTypes.h"
27 /// This contains the runtime configuration of LyX
28 class LyXRC //: public noncopyable {
29 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
30 // noncopyable again. For now I want to minimise changes. ARRae 20001010
39 RC_PRINTPAGERANGEFLAG,
41 RC_PRINTCOLLCOPIESFLAG,
43 RC_PRINTLANDSCAPEFLAG,
47 RC_PRINTFILEEXTENSION,
48 RC_PRINTEXSTRAOPTIONS,
49 RC_PRINTSPOOL_COMMAND,
50 RC_PRINTSPOOL_PRINTERPREFIX,
52 RC_PRINTPAPERDIMENSIONFLAG,
53 RC_CUSTOM_EXPORT_COMMAND,
54 RC_CUSTOM_EXPORT_FORMAT,
60 RC_SCREEN_FONT_TYPEWRITER,
61 RC_SCREEN_FONT_ROMAN_FOUNDRY,
62 RC_SCREEN_FONT_SANS_FOUNDRY,
63 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
64 RC_SCREEN_FONT_ENCODING,
67 RC_POPUP_FONT_ENCODING,
88 RC_VIEWDVI_PAPEROPTION,
97 RC_SCREEN_FONT_SCALABLE,
102 RC_CURSOR_FOLLOWS_SCROLLBAR,
103 RC_DIALOGS_ICONIFY_WITH_MAIN,
108 RC_MARK_FOREIGN_LANGUAGE,
110 RC_LANGUAGE_AUTO_BEGIN,
111 RC_LANGUAGE_AUTO_END,
112 RC_LANGUAGE_COMMAND_BEGIN,
113 RC_LANGUAGE_COMMAND_END,
114 RC_LANGUAGE_COMMAND_LOCAL,
115 RC_LANGUAGE_GLOBAL_OPTIONS,
116 RC_LANGUAGE_USE_BABEL,
117 RC_DATE_INSERT_FORMAT,
124 RC_LABEL_INIT_LENGTH,
127 RC_PREVIEW_HASHED_LABELS,
128 RC_PREVIEW_SCALE_FACTOR,
141 int read(std::string const & filename);
143 void write(std::string const & filename) const;
147 void output(std::ostream & os) const;
149 static std::string const getDescription(LyXRCTags);
151 std::string bind_file;
157 std::string print_command;
159 std::string print_evenpage_flag;
161 std::string print_oddpage_flag;
163 std::string print_pagerange_flag;
165 std::string print_copies_flag;
167 std::string print_collcopies_flag;
169 std::string print_reverse_flag;
171 std::string print_landscape_flag;
173 std::string print_to_printer;
175 bool print_adapt_output;
177 std::string print_to_file;
179 std::string print_file_extension;
181 std::string print_extra_options;
183 std::string print_spool_command;
185 std::string print_spool_printerprefix;
187 std::string print_paper_flag;
189 std::string print_paper_dimension_flag;
191 std::string custom_export_command;
193 std::string custom_export_format;
194 /// postscript interpreter (in general "gs", if it is installed)
195 std::string ps_command;
196 /// option for telling the dvi viewer about the paper size
197 std::string view_dvi_paper_option;
198 /// default paper size for local xdvi/dvips/ghostview/whatever
199 PAPER_SIZE default_papersize;
200 /// command to run chktex incl. options
201 std::string chktex_command;
203 std::string document_path;
205 std::string template_path;
207 std::string tempdir_path;
211 bool auto_region_delete;
212 /// flag telling whether lastfiles should be checked for existance
213 bool auto_reset_options;
215 bool check_lastfiles;
216 /// filename for lastfiles file
217 std::string lastfiles;
218 /// maximal number of lastfiles
219 unsigned int num_lastfiles;
220 /// shall a backup file be created
222 /// A directory for storing backup files
223 std::string backupdir_path;
224 /// Zoom factor for screen fonts
226 /// parameter for button_4 and button_5 (scrollwheel)
227 unsigned int wheel_jump;
228 /// Screen font sizes in points for each font size
229 float font_sizes[10];
230 /// Allow the use of scalable fonts? Default is yes.
231 bool use_scalable_fonts;
237 std::string roman_font_name;
239 std::string sans_font_name;
241 std::string typewriter_font_name;
243 std::string roman_font_foundry;
245 std::string sans_font_foundry;
247 std::string typewriter_font_foundry;
249 std::string popup_bold_font;
251 std::string popup_normal_font;
253 std::string font_norm;
274 FontEncoding font_norm_type;
276 void set_font_norm_type();
278 std::string popup_font_encoding;
280 unsigned int autosave;
282 std::string ascii_roff_command;
284 unsigned int ascii_linelen;
285 /// use library instead of process
288 std::string isp_command;
289 /// Accept compound words in spellchecker?
290 bool isp_accept_compound;
291 /// Pass input encoding switch to ispell?
292 bool isp_use_input_encoding;
293 /// Use alternate language?
294 bool isp_use_alt_lang;
295 /// Use personal dictionary?
296 bool isp_use_pers_dict;
297 /// Use escape chars?
298 bool isp_use_esc_chars;
299 /// Alternate language for ispell
300 std::string isp_alt_lang;
301 /// Alternate personal dictionary file for ispell
302 std::string isp_pers_dict;
303 /// Escape characters
304 std::string isp_esc_chars;
308 std::string primary_kbmap;
310 std::string secondary_kbmap;
312 std::string lyxpipes;
314 std::string date_insert_format;
316 std::string language_package;
318 bool language_auto_begin;
320 bool language_auto_end;
322 std::string language_command_begin;
324 std::string language_command_end;
326 std::string language_command_local;
328 bool language_global_options;
330 bool language_use_babel;
336 bool mark_foreign_language;
338 std::string default_language;
340 bool cursor_follows_scrollbar;
342 bool dialogs_iconify_with_main;
344 int label_init_length;
346 lyx::graphics::DisplayType display_graphics;
352 bool preview_hashed_labels;
354 float preview_scale_factor;
356 std::string user_name;
358 std::string user_email;
364 extern LyXRC system_lyxrc;