]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
Dekel's import/export patch
[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         /// postscript interpreter (in general "gs", if it is installed)
91         string ps_command;
92         /// option for telling the dvi viewer about the paper size
93         string view_dvi_paper_option;
94         /// default paper size for local xdvi/dvips/ghostview/whatever
95         BufferParams::PAPER_SIZE default_papersize;
96         /// command to run chktex incl. options
97         string chktex_command;
98         ///
99         string document_path;
100         ///
101         string template_path;
102         ///
103         string tempdir_path;
104         ///
105         bool use_tempdir;
106         ///
107         bool auto_region_delete;
108         /// flag telling whether lastfiles should be checked for existance
109         bool check_lastfiles;
110         /// filename for lastfiles file
111         string lastfiles;
112         /// maximal number of lastfiles
113         unsigned int num_lastfiles;
114         /// shall a backup file be created
115         bool make_backup;
116         /// A directory for storing backup files
117         string backupdir_path;
118         /// Zoom factor for screen fonts
119         unsigned int zoom;
120         /// parameter for button_4 and button_5 (scrollwheel)
121         unsigned int wheel_jump;
122         /// Screen font sizes in points for each font size
123         float font_sizes[10];
124         /// Allow the use of scalable fonts? Default is yes.
125         bool use_scalable_fonts;
126         /// DPI of monitor
127         float dpi;
128         /// Whether lyx should handle deadkeys by itself
129         bool override_x_deadkeys;
130         ///
131         string fontenc;
132         ///
133         string roman_font_name;
134         ///
135         string sans_font_name;
136         ///
137         string typewriter_font_name;
138         ///
139         string menu_font_name;
140         ///
141         string popup_font_name;
142         ///
143         string font_norm;
144         ///
145         enum FontEncoding {
146                 ///
147                 ISO_10646_1,
148                 ///
149                 ISO_8859_6_8,
150                 ///
151                 OTHER_ENCODING
152         };
153         ///
154         FontEncoding font_norm_type;
155         ///
156         void set_font_norm_type();
157         ///
158         string font_norm_menu;
159         ///
160         unsigned int autosave;
161         ///
162         string fax_command;
163         ///
164         string phone_book;
165         ///
166         string fax_program;
167         ///
168         string ascii_roff_command;
169         ///
170         unsigned int ascii_linelen;
171         /// Ispell command
172         string isp_command;
173         /// Accept compound words in spellchecker?
174         bool isp_accept_compound;
175         /// Pass input encoding switch to ispell?
176         bool isp_use_input_encoding;
177         /// Use alternate language?
178         bool isp_use_alt_lang;
179         /// Use personal dictionary?
180         bool isp_use_pers_dict;
181         /// Use escape chars?
182         bool isp_use_esc_chars;
183         /// Alternate language for ispell
184         string isp_alt_lang;
185         /// Alternate personal dictionary file for ispell
186         string isp_pers_dict;
187         /// Escape characters
188         string isp_esc_chars;
189         ///
190         bool use_kbmap;
191         /// Ask for confirmation of exit when there are unsaved documents?
192         bool exit_confirmation;
193         /// Should we display short-cut information in the minibuffer?
194         bool display_shortcuts;
195         ///
196         string primary_kbmap;
197         ///
198         string secondary_kbmap;
199         ///
200         string lyxpipes;
201         ///
202         string date_insert_format;
203         ///
204         string language_package;
205         ///
206         bool language_auto_begin;
207         ///
208         bool language_auto_end;
209         ///
210         string language_command_begin;
211         ///
212         string language_command_end;
213         ///
214         bool rtl_support;
215         ///
216         bool auto_number;
217         ///
218         bool mark_foreign_language;
219         ///
220         bool show_banner;
221         /// Do we have to use a GUI?
222         bool use_gui;
223         ///
224         bool new_ask_filename;
225         ///
226         string default_language;
227         ///
228         bool cursor_follows_scrollbar;
229 };
230
231 ///
232 extern LyXRC lyxrc;
233 ///
234 extern LyXRC system_lyxrc;
235 #endif