]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
lyxrc changes to allow preferences-save to only save the differences between system...
[lyx.git] / src / lyxrc.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef LYXRC_H
13 #define LYXRC_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "bufferparams.h"
20 #include <boost/utility.hpp>
21
22 /// This contains the runtime configuration of LyX
23 class LyXRC //: public noncopyable {
24 // after 1.1.6 I will use a LyXRCStruct here and then this can be made
25 // noncopyable again.  For now I want to minimise changes.  ARRae 20001010
26 {
27 public:
28         ///
29         LyXRC();
30         ///
31         void setDefaults();
32         ///
33         int read (string const & filename);
34         ///
35         void write(string const & filename) const;
36         ///
37         void print() const;
38         ///
39         void output(std::ostream & os) const;
40         /// Is a bind file already (or currently) read?
41         bool hasBindFile;
42         ///
43         int ReadBindFile(string const & name = "cua");
44         ///
45         string bind_file;
46         ///
47         string ui_file;
48         ///
49         string printer;
50         ///
51         string print_command;
52         ///
53         string print_evenpage_flag;
54         ///
55         string print_oddpage_flag;
56         ///
57         string print_pagerange_flag;
58         ///
59         string print_copies_flag;
60         ///
61         string print_collcopies_flag;
62         ///
63         string print_reverse_flag;
64         ///
65         string print_landscape_flag;
66         ///
67         string print_to_printer;
68         ///
69         bool print_adapt_output;
70         ///
71         string print_to_file;
72         ///
73         string print_file_extension;
74         ///
75         string print_extra_options;
76         ///
77         string print_spool_command;
78         ///
79         string print_spool_printerprefix;
80         ///
81         string print_paper_flag;
82         ///
83         string print_paper_dimension_flag;
84         ///
85         string custom_export_command;
86         ///
87         string custom_export_format;
88         ///
89         bool pdf_mode;
90         ///
91         string literate_extension;
92         /// program for running relyx
93         string relyx_command;
94         /// postscript interpreter (in general "gs", if it is installed)
95         string ps_command;
96         /// option for telling the dvi viewer about the paper size
97         string view_dvi_paper_option;
98         /// default paper size for local xdvi/dvips/ghostview/whatever
99         BufferParams::PAPER_SIZE default_papersize;
100         /// command to run chktex incl. options
101         string chktex_command;
102         ///
103         string document_path;
104         ///
105         string template_path;
106         ///
107         string tempdir_path;
108         ///
109         bool use_tempdir;
110         ///
111         bool auto_region_delete;
112         /// flag telling whether lastfiles should be checked for existance
113         bool check_lastfiles;
114         /// filename for lastfiles file
115         string lastfiles;
116         /// maximal number of lastfiles
117         unsigned int num_lastfiles;
118         /// shall a backup file be created
119         bool make_backup;
120         /// A directory for storing backup files
121         string backupdir_path;
122         /// Zoom factor for screen fonts
123         unsigned int zoom;
124         /// parameter for button_4 and button_5 (scrollwheel)
125         unsigned int wheel_jump;
126         /// Screen font sizes in points for each font size
127         float font_sizes[10];
128         /// Allow the use of scalable fonts? Default is yes.
129         bool use_scalable_fonts;
130         /// DPI of monitor
131         float dpi;
132         /// Whether lyx should handle deadkeys by itself
133         bool override_x_deadkeys;
134         ///
135         string fontenc;
136         ///
137         string roman_font_name;
138         ///
139         string sans_font_name;
140         ///
141         string typewriter_font_name;
142         ///
143         string menu_font_name;
144         ///
145         string popup_font_name;
146         ///
147         string font_norm;
148         ///
149         enum FontEncoding {
150                 ///
151                 ISO_10646_1,
152                 ///
153                 ISO_8859_6_8,
154                 ///
155                 OTHER_ENCODING
156         };
157         ///
158         FontEncoding font_norm_type;
159         ///
160         void set_font_norm_type();
161         ///
162         string font_norm_menu;
163         ///
164         unsigned int autosave;
165         ///
166         string fax_command;
167         ///
168         string phone_book;
169         ///
170         string fax_program;
171         ///
172         string ascii_roff_command;
173         ///
174         unsigned int ascii_linelen;
175         /// Ispell command
176         string isp_command;
177         /// Accept compound words in spellchecker?
178         bool isp_accept_compound;
179         /// Pass input encoding switch to ispell?
180         bool isp_use_input_encoding;
181         /// Use alternate language?
182         bool isp_use_alt_lang;
183         /// Use personal dictionary?
184         bool isp_use_pers_dict;
185         /// Use escape chars?
186         bool isp_use_esc_chars;
187         /// Alternate language for ispell
188         string isp_alt_lang;
189         /// Alternate personal dictionary file for ispell
190         string isp_pers_dict;
191         /// Escape characters
192         string isp_esc_chars;
193         ///
194         bool use_kbmap;
195         /// Ask for confirmation of exit when there are unsaved documents?
196         bool exit_confirmation;
197         /// Should we display short-cut information in the minibuffer?
198         bool display_shortcuts;
199         ///
200         string primary_kbmap;
201         ///
202         string secondary_kbmap;
203         ///
204         string lyxpipes;
205         ///
206         string date_insert_format;
207         ///
208         string language_package;
209         ///
210         bool language_auto_begin;
211         ///
212         bool language_auto_end;
213         ///
214         string language_command_begin;
215         ///
216         string language_command_end;
217         ///
218         bool rtl_support;
219         ///
220         bool auto_number;
221         ///
222         bool mark_foreign_language;
223         ///
224         bool show_banner;
225         /// Do we have to use a GUI?
226         bool use_gui;
227         ///
228         string linuxdoc_to_lyx_command;
229         ///
230         bool new_ask_filename;
231         ///
232         string default_language;
233         ///
234         bool cursor_follows_scrollbar;
235 };
236
237 ///
238 extern LyXRC lyxrc;
239 ///
240 extern LyXRC system_lyxrc;
241 #endif