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 "support/utility.hpp"
22 /// This contains the runtime configuration of LyX
23 class LyXRC : public noncopyable {
30 int read (string const & filename);
32 void write(string const & filename) const;
36 void output(std::ostream & os) const;
37 /// Is a bind file already (or currently) read?
40 int ReadBindFile(string const & name = "cua");
50 string print_evenpage_flag;
52 string print_oddpage_flag;
54 string print_pagerange_flag;
56 string print_copies_flag;
58 string print_collcopies_flag;
60 string print_reverse_flag;
62 string print_landscape_flag;
64 string print_to_printer;
66 bool print_adapt_output;
70 string print_file_extension;
72 string print_extra_options;
74 string print_spool_command;
76 string print_spool_printerprefix;
78 string print_paper_flag;
80 string print_paper_dimension_flag;
82 string custom_export_command;
84 string custom_export_format;
87 /// program for running latex
90 string pdflatex_command;
92 string pdf_to_ps_command;
94 string dvi_to_ps_command;
95 /// program for performing literate programming
96 string literate_command;
98 string literate_extension;
100 string literate_error_filter;
101 /// program for compiling
102 string build_command;
104 string build_error_filter;
105 /// program for running relyx
106 string relyx_command;
107 /// postscript interpreter (in general "gs", if it is installed)
109 /// program for viewing postscript output (default "ghostview -swap")
110 string view_ps_command;
111 /// program for viewing postscript pictures (default "ghostview")
112 string view_pspic_command;
113 /// program for viewing dvi output (default "xdvi")
114 string view_dvi_command;
115 /// option for telling the dvi viewer about the paper size
116 string view_dvi_paper_option;
117 /// program for viewing pdf output (default "xpdf")
118 string view_pdf_command;
119 /// default paper size for local xdvi/dvips/ghostview/whatever
120 BufferParams::PAPER_SIZE default_papersize;
121 /// command to run chktex incl. options
122 string chktex_command;
123 /// command to run an html converter incl. options
126 string document_path;
128 string template_path;
134 bool auto_region_delete;
135 /// flag telling whether lastfiles should be checked for existance
136 bool check_lastfiles;
137 /// filename for lastfiles file
139 /// maximal number of lastfiles
140 unsigned int num_lastfiles;
141 /// shall a backup file be created
143 /// A directory for storing backup files
144 string backupdir_path;
145 /// Zoom factor for screen fonts
147 /// parameter for button_4 and button_5 (scrollwheel)
148 unsigned int wheel_jump;
149 /// Screen font sizes in points for each font size
150 float font_sizes[10];
151 /// Allow the use of scalable fonts? Default is yes.
152 bool use_scalable_fonts;
155 /// Whether lyx should handle deadkeys by itself
156 bool override_x_deadkeys;
160 string roman_font_name;
162 string sans_font_name;
164 string typewriter_font_name;
166 string menu_font_name;
168 string popup_font_name;
181 FontEncoding font_norm_type;
183 void set_font_norm_type();
185 string font_norm_menu;
187 unsigned int autosave;
195 string ascii_roff_command;
197 unsigned int ascii_linelen;
200 /// Accept compound words in spellchecker?
201 bool isp_accept_compound;
202 /// Pass input encoding switch to ispell?
203 bool isp_use_input_encoding;
204 /// Use alternate language?
205 bool isp_use_alt_lang;
206 /// Use personal dictionary?
207 bool isp_use_pers_dict;
208 /// Use escape chars?
209 bool isp_use_esc_chars;
210 /// Alternate language for ispell
212 /// Alternate personal dictionary file for ispell
213 string isp_pers_dict;
214 /// Escape characters
215 string isp_esc_chars;
218 /// Ask for confirmation of exit when there are unsaved documents?
219 bool exit_confirmation;
220 /// Should we display short-cut information in the minibuffer?
221 bool display_shortcuts;
223 string primary_kbmap;
225 string secondary_kbmap;
229 string date_insert_format;
231 string language_package;
233 bool language_auto_begin;
235 bool language_auto_end;
237 string language_command_begin;
239 string language_command_end;
245 bool mark_foreign_language;
248 /// Do we have to use a GUI?
251 string linuxdoc_to_lyx_command;
253 string linuxdoc_to_html_command;
255 string linuxdoc_to_latex_command;
257 string docbook_to_dvi_command;
259 string docbook_to_html_command;
261 string docbook_to_pdf_command;
263 bool new_ask_filename;
269 //extern LyXRC system_lyxrc;