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"
29 /// This contains the runtime configuration of LyX
30 class LyXRC //: public noncopyable {
31 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
32 // noncopyable again. For now I want to minimise changes. ARRae 20001010
36 RC_ACCEPT_COMPOUND = 1,
51 RC_CURSOR_FOLLOWS_SCROLLBAR,
52 RC_CUSTOM_EXPORT_COMMAND,
53 RC_CUSTOM_EXPORT_FORMAT,
55 RC_DATE_INSERT_FORMAT,
58 RC_DIALOGS_ICONIFY_WITH_MAIN,
70 RC_LANGUAGE_AUTO_BEGIN,
72 RC_LANGUAGE_COMMAND_BEGIN,
73 RC_LANGUAGE_COMMAND_END,
74 RC_LANGUAGE_COMMAND_LOCAL,
75 RC_LANGUAGE_GLOBAL_OPTIONS,
77 RC_LANGUAGE_USE_BABEL,
80 RC_MARK_FOREIGN_LANGUAGE,
85 RC_POPUP_FONT_ENCODING,
88 RC_PREVIEW_HASHED_LABELS,
89 RC_PREVIEW_SCALE_FACTOR,
90 RC_PRINTCOLLCOPIESFLAG,
94 RC_PRINTEXSTRAOPTIONS,
95 RC_PRINTFILEEXTENSION,
96 RC_PRINTLANDSCAPEFLAG,
98 RC_PRINTPAGERANGEFLAG,
99 RC_PRINTPAPERDIMENSIONFLAG,
102 RC_PRINTSPOOL_COMMAND,
103 RC_PRINTSPOOL_PRINTERPREFIX,
106 RC_PRINT_ADAPTOUTPUT,
110 RC_SCREEN_FONT_ENCODING,
111 RC_SCREEN_FONT_ROMAN,
112 RC_SCREEN_FONT_ROMAN_FOUNDRY,
114 RC_SCREEN_FONT_SANS_FOUNDRY,
115 RC_SCREEN_FONT_SCALABLE,
116 RC_SCREEN_FONT_SIZES,
117 RC_SCREEN_FONT_TYPEWRITER,
118 RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
126 RC_TEX_ALLOWS_SPACES,
136 RC_VIEWDVI_PAPEROPTION,
147 int read(std::string const & filename);
149 int read(std::istream &);
155 void write(std::string const & filename,
156 bool ignore_system_lyxrc) const;
158 void write(std::ostream & os,
159 bool ignore_system_lyxrc) const;
163 static std::string const getDescription(LyXRCTags);
165 std::string bind_file;
171 std::string print_command;
173 std::string print_evenpage_flag;
175 std::string print_oddpage_flag;
177 std::string print_pagerange_flag;
179 std::string print_copies_flag;
181 std::string print_collcopies_flag;
183 std::string print_reverse_flag;
185 std::string print_landscape_flag;
187 std::string print_to_printer;
189 bool print_adapt_output;
191 std::string print_to_file;
193 std::string print_file_extension;
195 std::string print_extra_options;
197 std::string print_spool_command;
199 std::string print_spool_printerprefix;
201 std::string print_paper_flag;
203 std::string print_paper_dimension_flag;
205 std::string custom_export_command;
207 std::string custom_export_format;
208 /// option for telling the dvi viewer about the paper size
209 std::string view_dvi_paper_option;
210 /// default paper size for local xdvi/dvips/ghostview/whatever
211 PAPER_SIZE default_papersize;
212 /// command to run chktex incl. options
213 std::string chktex_command;
214 /// command to run bibtex incl. options
215 std::string bibtex_command;
216 /// command to run makeindex incl. options or other index programs
217 std::string index_command;
219 std::string document_path;
221 std::string template_path;
223 std::string tempdir_path;
225 bool auto_region_delete;
226 /// flag telling whether lastfiles should be checked for existance
227 bool auto_reset_options;
229 bool check_lastfiles;
230 /// filename for lastfiles file
231 std::string lastfiles;
232 /// maximal number of lastfiles
233 unsigned int num_lastfiles;
234 /// shall a backup file be created
236 /// A directory for storing backup files
237 std::string backupdir_path;
238 /// Zoom factor for screen fonts
240 /// parameter for button_4 and button_5 (scrollwheel)
241 unsigned int wheel_jump;
242 /// Screen font sizes in points for each font size
243 std::string font_sizes[10];
244 /// Allow the use of scalable fonts? Default is yes.
245 bool use_scalable_fonts;
251 std::string roman_font_name;
253 std::string sans_font_name;
255 std::string typewriter_font_name;
257 std::string roman_font_foundry;
259 std::string sans_font_foundry;
261 std::string typewriter_font_foundry;
263 std::string popup_bold_font;
265 std::string popup_normal_font;
267 std::string font_norm;
288 FontEncoding font_norm_type;
290 void set_font_norm_type();
292 std::string popup_font_encoding;
294 unsigned int autosave;
296 std::string ascii_roff_command;
298 unsigned int ascii_linelen;
299 /// use library instead of process
302 std::string isp_command;
303 /// Accept compound words in spellchecker?
304 bool isp_accept_compound;
305 /// Pass input encoding switch to ispell?
306 bool isp_use_input_encoding;
307 /// Use alternate language?
308 bool isp_use_alt_lang;
309 /// Use personal dictionary?
310 bool isp_use_pers_dict;
311 /// Use escape chars?
312 bool isp_use_esc_chars;
313 /// Alternate language for ispell
314 std::string isp_alt_lang;
315 /// Alternate personal dictionary file for ispell
316 std::string isp_pers_dict;
317 /// Escape characters
318 std::string isp_esc_chars;
322 std::string primary_kbmap;
324 std::string secondary_kbmap;
326 std::string lyxpipes;
328 std::string date_insert_format;
330 std::string language_package;
332 bool language_auto_begin;
334 bool language_auto_end;
336 std::string language_command_begin;
338 std::string language_command_end;
340 std::string language_command_local;
342 bool language_global_options;
344 bool language_use_babel;
350 bool mark_foreign_language;
352 std::string default_language;
354 bool cursor_follows_scrollbar;
356 bool dialogs_iconify_with_main;
358 int label_init_length;
360 lyx::graphics::DisplayType display_graphics;
370 PreviewStatus preview;
372 bool preview_hashed_labels;
374 std::string preview_scale_factor;
376 std::string user_name;
378 std::string user_email;
380 bool cygwin_path_fix;
381 /// True if the TeX engine can handle file names containing spaces
382 bool tex_allows_spaces;
383 /** Prepend paths to the PATH environment variable.
384 * The string is input, stored and output in native format.
386 std::string path_prefix;
390 /** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
391 * It can be forward-declared and passed as a function argument without
392 * having to expose lyxrc.h.
394 class LyXRC_PreviewStatus {
395 LyXRC::PreviewStatus val_;
397 LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
398 operator LyXRC::PreviewStatus() const{ return val_; }
405 extern LyXRC system_lyxrc;