]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / lyxrc.h
1 // -*- C++ -*-
2 /**
3  * \file lyxrc.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * Full author contact details are available in file CREDITS
8  */
9
10 #ifndef LYXRC_H
11 #define LYXRC_H
12
13 #include "paper.h" 
14 #include "graphics/GraphicsTypes.h"
15
16 // #include <boost/utility.hpp>
17
18 /// This contains the runtime configuration of LyX
19 class LyXRC //: public noncopyable {
20 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
21 // noncopyable again.  For now I want to minimise changes.  ARRae 20001010
22 {
23 public:
24 enum LyXRCTags {
25         RC_FONT_ENCODING = 1,
26         RC_PRINTER,
27         RC_PRINT_COMMAND,
28         RC_PRINTEVENPAGEFLAG,
29         RC_PRINTODDPAGEFLAG,
30         RC_PRINTPAGERANGEFLAG,
31         RC_PRINTCOPIESFLAG,
32         RC_PRINTCOLLCOPIESFLAG,
33         RC_PRINTREVERSEFLAG,
34         RC_PRINTLANDSCAPEFLAG,
35         RC_PRINTTOPRINTER,
36         RC_PRINT_ADAPTOUTPUT,
37         RC_PRINTTOFILE,
38         RC_PRINTFILEEXTENSION,
39         RC_PRINTEXSTRAOPTIONS,
40         RC_PRINTSPOOL_COMMAND,
41         RC_PRINTSPOOL_PRINTERPREFIX,
42         RC_PRINTPAPERFLAG,
43         RC_PRINTPAPERDIMENSIONFLAG,
44         RC_CUSTOM_EXPORT_COMMAND,
45         RC_CUSTOM_EXPORT_FORMAT,
46         RC_SCREEN_DPI,
47         RC_SCREEN_ZOOM,
48         RC_SCREEN_FONT_SIZES,
49         RC_SCREEN_FONT_ROMAN,
50         RC_SCREEN_FONT_SANS,
51         RC_SCREEN_FONT_TYPEWRITER,
52         RC_SCREEN_FONT_ROMAN_FOUNDRY,
53         RC_SCREEN_FONT_SANS_FOUNDRY,
54         RC_SCREEN_FONT_TYPEWRITER_FOUNDRY,
55         RC_SCREEN_FONT_ENCODING,
56         RC_POPUP_BOLD_FONT,
57         RC_POPUP_NORMAL_FONT,
58         RC_POPUP_FONT_ENCODING,
59         RC_SET_COLOR,
60         RC_AUTOSAVE,
61         RC_DOCUMENTPATH,
62         RC_TEMPLATEPATH,
63         RC_TEMPDIRPATH,
64         RC_USETEMPDIR,
65         RC_LASTFILES,
66         RC_AUTOREGIONDELETE,
67         RC_AUTORESET_OPTIONS,
68         RC_SERVERPIPE,
69         RC_INPUT,
70         RC_BINDFILE,
71         RC_UIFILE,
72         RC_KBMAP,
73         RC_KBMAP_PRIMARY,
74         RC_KBMAP_SECONDARY,
75         RC_ASCIIROFF_COMMAND,
76         RC_ASCII_LINELEN,
77         RC_NUMLASTFILES,
78         RC_CHECKLASTFILES,
79         RC_VIEWDVI_PAPEROPTION,
80         RC_DEFAULT_PAPERSIZE,
81         RC_PS_COMMAND,
82         RC_ACCEPT_COMPOUND,
83         RC_SPELL_COMMAND,
84         RC_USE_INP_ENC,
85         RC_USE_ALT_LANG,
86         RC_USE_PERS_DICT,
87         RC_USE_ESC_CHARS,
88         RC_SCREEN_FONT_SCALABLE,
89         RC_ALT_LANG,
90         RC_PERS_DICT,
91         RC_ESC_CHARS,
92         RC_CHKTEX_COMMAND,
93         RC_CURSOR_FOLLOWS_SCROLLBAR,
94         RC_DIALOGS_ICONIFY_WITH_MAIN,
95         RC_MAKE_BACKUP,
96         RC_BACKUPDIR_PATH,
97         RC_RTL_SUPPORT,
98         RC_AUTO_NUMBER,
99         RC_MARK_FOREIGN_LANGUAGE,
100         RC_LANGUAGE_PACKAGE,
101         RC_LANGUAGE_AUTO_BEGIN,
102         RC_LANGUAGE_AUTO_END,
103         RC_LANGUAGE_COMMAND_BEGIN,
104         RC_LANGUAGE_COMMAND_END,
105         RC_LANGUAGE_COMMAND_LOCAL,
106         RC_LANGUAGE_GLOBAL_OPTIONS,
107         RC_LANGUAGE_USE_BABEL,
108         RC_DATE_INSERT_FORMAT,
109         RC_SHOW_BANNER,
110         RC_WHEEL_JUMP,
111         RC_CONVERTER,
112         RC_VIEWER,
113         RC_FORMAT,
114         RC_DEFAULT_LANGUAGE,
115         RC_LABEL_INIT_LENGTH,
116         RC_DISPLAY_GRAPHICS,
117         RC_PREVIEW,
118         RC_PREVIEW_HASHED_LABELS,
119         RC_PREVIEW_SCALE_FACTOR,
120         RC_USE_SPELL_LIB,
121         RC_USER_NAME,
122         RC_USER_EMAIL,
123         RC_LAST
124 };
125
126
127         ///
128         LyXRC();
129         ///
130         void setDefaults();
131         ///
132         int read(string const & filename);
133         ///
134         void write(string const & filename) const;
135         ///
136         void print() const;
137         ///
138         void output(std::ostream & os) const;
139         ///
140         static string const getDescription(LyXRCTags);
141         ///
142         string bind_file;
143         ///
144         string ui_file;
145         ///
146         string printer;
147         ///
148         string print_command;
149         ///
150         string print_evenpage_flag;
151         ///
152         string print_oddpage_flag;
153         ///
154         string print_pagerange_flag;
155         ///
156         string print_copies_flag;
157         ///
158         string print_collcopies_flag;
159         ///
160         string print_reverse_flag;
161         ///
162         string print_landscape_flag;
163         ///
164         string print_to_printer;
165         ///
166         bool print_adapt_output;
167         ///
168         string print_to_file;
169         ///
170         string print_file_extension;
171         ///
172         string print_extra_options;
173         ///
174         string print_spool_command;
175         ///
176         string print_spool_printerprefix;
177         ///
178         string print_paper_flag;
179         ///
180         string print_paper_dimension_flag;
181         ///
182         string custom_export_command;
183         ///
184         string custom_export_format;
185         /// postscript interpreter (in general "gs", if it is installed)
186         string ps_command;
187         /// option for telling the dvi viewer about the paper size
188         string view_dvi_paper_option;
189         /// default paper size for local xdvi/dvips/ghostview/whatever
190         PAPER_SIZE default_papersize;
191         /// command to run chktex incl. options
192         string chktex_command;
193         ///
194         string document_path;
195         ///
196         string template_path;
197         ///
198         string tempdir_path;
199         ///
200         bool use_tempdir;
201         ///
202         bool auto_region_delete;
203         /// flag telling whether lastfiles should be checked for existance
204         bool auto_reset_options;
205         ///
206         bool check_lastfiles;
207         /// filename for lastfiles file
208         string lastfiles;
209         /// maximal number of lastfiles
210         unsigned int num_lastfiles;
211         /// shall a backup file be created
212         bool make_backup;
213         /// A directory for storing backup files
214         string backupdir_path;
215         /// Zoom factor for screen fonts
216         unsigned int zoom;
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;
223         /// DPI of monitor
224         float dpi;
225         ///
226         string fontenc;
227         ///
228         string roman_font_name;
229         ///
230         string sans_font_name;
231         ///
232         string typewriter_font_name;
233         ///
234         string roman_font_foundry;
235         ///
236         string sans_font_foundry;
237         ///
238         string typewriter_font_foundry;
239         ///
240         string popup_bold_font;
241         ///
242         string popup_normal_font;
243         ///
244         string font_norm;
245         ///
246         enum FontEncoding {
247                 ///
248                 ISO_10646_1,
249                 ///
250                 ISO_8859_1,
251                 ///
252                 ISO_8859_3,
253                 ///
254                 ISO_8859_4,
255                 ///
256                 ISO_8859_6_8,
257                 ///
258                 ISO_8859_9,
259                 ///
260                 ISO_8859_15,
261                 ///
262                 OTHER_ENCODING
263         };
264         ///
265         FontEncoding font_norm_type;
266         ///
267         void set_font_norm_type();
268         ///
269         string popup_font_encoding;
270         ///
271         unsigned int autosave;
272         ///
273         string ascii_roff_command;
274         ///
275         unsigned int ascii_linelen;
276         /// use library instead of process
277         bool use_spell_lib;
278         /// Ispell command
279         string isp_command;
280         /// Accept compound words in spellchecker?
281         bool isp_accept_compound;
282         /// Pass input encoding switch to ispell?
283         bool isp_use_input_encoding;
284         /// Use alternate language?
285         bool isp_use_alt_lang;
286         /// Use personal dictionary?
287         bool isp_use_pers_dict;
288         /// Use escape chars?
289         bool isp_use_esc_chars;
290         /// Alternate language for ispell
291         string isp_alt_lang;
292         /// Alternate personal dictionary file for ispell
293         string isp_pers_dict;
294         /// Escape characters
295         string isp_esc_chars;
296         ///
297         bool use_kbmap;
298         ///
299         string primary_kbmap;
300         ///
301         string secondary_kbmap;
302         ///
303         string lyxpipes;
304         ///
305         string date_insert_format;
306         ///
307         string language_package;
308         ///
309         bool language_auto_begin;
310         ///
311         bool language_auto_end;
312         ///
313         string language_command_begin;
314         ///
315         string language_command_end;
316         ///
317         string language_command_local;
318         ///
319         bool language_global_options;
320         ///
321         bool language_use_babel;
322         ///
323         bool rtl_support;
324         ///
325         bool auto_number;
326         ///
327         bool mark_foreign_language;
328         ///
329         string default_language;
330         ///
331         bool cursor_follows_scrollbar;
332         ///
333         bool dialogs_iconify_with_main;
334         ///
335         int label_init_length;
336         ///
337         lyx::graphics::DisplayType display_graphics;
338         ///
339         bool show_banner;
340         ///
341         bool preview;
342         ///
343         bool preview_hashed_labels;
344         ///
345         float preview_scale_factor;
346         /// user name
347         string user_name;
348         /// user email
349         string user_email;
350 };
351
352 ///
353 extern LyXRC lyxrc;
354 ///
355 extern LyXRC system_lyxrc;
356 #endif