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,
96 RC_SCREEN_FONT_SCALABLE,
101 RC_CURSOR_FOLLOWS_SCROLLBAR,
102 RC_DIALOGS_ICONIFY_WITH_MAIN,
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_LANGUAGE_COMMAND_LOCAL,
114 RC_LANGUAGE_GLOBAL_OPTIONS,
115 RC_LANGUAGE_USE_BABEL,
116 RC_DATE_INSERT_FORMAT,
123 RC_LABEL_INIT_LENGTH,
126 RC_PREVIEW_HASHED_LABELS,
127 RC_PREVIEW_SCALE_FACTOR,
140 int read(std::string const & filename);
142 void write(std::string const & filename) const;
146 void output(std::ostream & os) const;
148 static std::string const getDescription(LyXRCTags);
150 std::string bind_file;
156 std::string print_command;
158 std::string print_evenpage_flag;
160 std::string print_oddpage_flag;
162 std::string print_pagerange_flag;
164 std::string print_copies_flag;
166 std::string print_collcopies_flag;
168 std::string print_reverse_flag;
170 std::string print_landscape_flag;
172 std::string print_to_printer;
174 bool print_adapt_output;
176 std::string print_to_file;
178 std::string print_file_extension;
180 std::string print_extra_options;
182 std::string print_spool_command;
184 std::string print_spool_printerprefix;
186 std::string print_paper_flag;
188 std::string print_paper_dimension_flag;
190 std::string custom_export_command;
192 std::string custom_export_format;
193 /// option for telling the dvi viewer about the paper size
194 std::string view_dvi_paper_option;
195 /// default paper size for local xdvi/dvips/ghostview/whatever
196 PAPER_SIZE default_papersize;
197 /// command to run chktex incl. options
198 std::string chktex_command;
200 std::string document_path;
202 std::string template_path;
204 std::string tempdir_path;
206 bool auto_region_delete;
207 /// flag telling whether lastfiles should be checked for existance
208 bool auto_reset_options;
210 bool check_lastfiles;
211 /// filename for lastfiles file
212 std::string lastfiles;
213 /// maximal number of lastfiles
214 unsigned int num_lastfiles;
215 /// shall a backup file be created
217 /// A directory for storing backup files
218 std::string backupdir_path;
219 /// Zoom factor for screen fonts
221 /// parameter for button_4 and button_5 (scrollwheel)
222 unsigned int wheel_jump;
223 /// Screen font sizes in points for each font size
224 float font_sizes[10];
225 /// Allow the use of scalable fonts? Default is yes.
226 bool use_scalable_fonts;
232 std::string roman_font_name;
234 std::string sans_font_name;
236 std::string typewriter_font_name;
238 std::string roman_font_foundry;
240 std::string sans_font_foundry;
242 std::string typewriter_font_foundry;
244 std::string popup_bold_font;
246 std::string popup_normal_font;
248 std::string font_norm;
269 FontEncoding font_norm_type;
271 void set_font_norm_type();
273 std::string popup_font_encoding;
275 unsigned int autosave;
277 std::string ascii_roff_command;
279 unsigned int ascii_linelen;
280 /// use library instead of process
283 std::string isp_command;
284 /// Accept compound words in spellchecker?
285 bool isp_accept_compound;
286 /// Pass input encoding switch to ispell?
287 bool isp_use_input_encoding;
288 /// Use alternate language?
289 bool isp_use_alt_lang;
290 /// Use personal dictionary?
291 bool isp_use_pers_dict;
292 /// Use escape chars?
293 bool isp_use_esc_chars;
294 /// Alternate language for ispell
295 std::string isp_alt_lang;
296 /// Alternate personal dictionary file for ispell
297 std::string isp_pers_dict;
298 /// Escape characters
299 std::string isp_esc_chars;
303 std::string primary_kbmap;
305 std::string secondary_kbmap;
307 std::string lyxpipes;
309 std::string date_insert_format;
311 std::string language_package;
313 bool language_auto_begin;
315 bool language_auto_end;
317 std::string language_command_begin;
319 std::string language_command_end;
321 std::string language_command_local;
323 bool language_global_options;
325 bool language_use_babel;
331 bool mark_foreign_language;
333 std::string default_language;
335 bool cursor_follows_scrollbar;
337 bool dialogs_iconify_with_main;
339 int label_init_length;
341 lyx::graphics::DisplayType display_graphics;
347 bool preview_hashed_labels;
349 float preview_scale_factor;
351 std::string user_name;
353 std::string user_email;
359 extern LyXRC system_lyxrc;