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