]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
9cab1ff5e0fe04c484f5b8a5a960e445256aa257
[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 <map>
20
21 #include "ToolbarDefaults.h"
22 #include "bufferparams.h"
23
24 using std::map;
25
26 /// This contains the runtime configuration of LyX
27 class LyXRC {
28 public:
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(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         ToolbarDefaults toolbardefaults;
46         ///
47         string printer;
48         ///
49         string print_command;
50         ///
51         string print_evenpage_flag;
52         ///
53         string print_oddpage_flag;
54         ///
55         string print_pagerange_flag;
56         ///
57         string print_copies_flag;
58         ///
59         string print_collcopies_flag;
60         ///
61         string print_reverse_flag;
62         ///
63         string print_landscape_flag;
64         ///
65         string print_to_printer;
66         ///
67         bool print_adapt_output;
68         ///
69         string print_to_file;
70         ///
71         string print_file_extension;
72         ///
73         string print_extra_options;
74         ///
75         string print_spool_command;
76         ///
77         string print_spool_printerprefix;
78         ///
79         string print_paper_flag;
80         ///
81         string print_paper_dimension_flag;
82         ///
83         string custom_export_command;
84         ///
85         string custom_export_format;
86         ///
87         bool pdf_mode;
88         /// program for running latex
89         string latex_command;
90         ///
91         string pdflatex_command;
92         ///
93         string pdf_to_ps_command;
94         ///
95         string dvi_to_ps_command;
96         /// program for performing literate programming
97         string literate_command;
98         string literate_extension;
99         string literate_error_filter;
100         /// program for compiling
101         string build_command;
102         string build_error_filter;
103         /// program for running relyx
104         string relyx_command;
105         /// postscript interpreter (in general "gs", if it is installed)
106         string ps_command;
107         /// program for viewing postscript output (default "ghostview -swap")
108         string view_ps_command;
109         /// program for viewing postscript pictures (default "ghostview")
110         string view_pspic_command;
111         /// program for viewing dvi output (default "xdvi")
112         string view_dvi_command;
113         /// option for telling the dvi viewer about the paper size
114         string view_dvi_paper_option;
115         /// program for viewing pdf output (default "xpdf")
116         string view_pdf_command;
117         /// default paper size for local xdvi/dvips/ghostview/whatever
118         BufferParams::PAPER_SIZE default_papersize;
119         /// command to run chktex incl. options
120         string chktex_command;
121         /// command to run an html converter incl. options
122         string html_command;
123         ///
124         string sgml_extra_options;
125         ///
126         string document_path;
127         ///
128         string template_path;
129         ///
130         string tempdir_path;
131         ///
132         bool use_tempdir;
133         ///
134         bool auto_region_delete;
135         /// flag telling whether lastfiles should be checked for existance
136         bool check_lastfiles;
137         /// filename for lastfiles file
138         string lastfiles;
139         /// maximal number of lastfiles
140         unsigned int num_lastfiles;
141         /// shall a backup file be created
142         bool make_backup;
143         /// Zoom factor for screen fonts
144         unsigned int zoom;
145         /// Screen font sizes in points for each font size
146         float font_sizes[10];
147         /// Allow the use of scalable fonts? Default is yes.
148         bool use_scalable_fonts;
149         /// DPI of monitor
150         float dpi;
151         ///
152         string fontenc;
153         ///
154         string roman_font_name;
155         ///
156         string sans_font_name;
157         ///
158         string typewriter_font_name;
159         ///
160         string menu_font_name;
161         ///
162         string popup_font_name;
163         ///
164         string font_norm;
165         ///
166         string font_norm_menu;
167         ///
168         unsigned int autosave;
169         ///
170         string fax_command;
171         ///
172         string phone_book;
173         ///
174         string fax_program;
175         ///
176         string ascii_roff_command;
177         ///
178         unsigned int ascii_linelen;
179         /// Ispell command
180         string isp_command;
181         /// Accept compound words in spellchecker?
182         bool isp_accept_compound;
183         /// Pass input encoding switch to ispell?
184         bool isp_use_input_encoding;
185         /// Use alternate language?
186         bool isp_use_alt_lang;
187         /// Use personal dictionary?
188         bool isp_use_pers_dict;
189         /// Use escape chars?
190         bool isp_use_esc_chars;
191         /// Alternate language for ispell
192         string isp_alt_lang;
193         /// Alternate personal dictionary file for ispell
194         string isp_pers_dict;
195         /// Escape characters
196         string isp_esc_chars;
197         ///
198         bool use_kbmap;
199         /// Ask for confirmation of exit when there are unsaved documents?
200         bool exit_confirmation;
201         /// Should we display short-cut information in the minibuffer?
202         bool display_shortcuts;
203         ///
204         string primary_kbmap;
205         ///
206         string secondary_kbmap;
207         ///
208         string lyxpipes;
209         ///
210         string date_insert_format;
211         ///
212         string language_package;
213         ///
214         bool language_auto_begin;
215         ///
216         bool language_auto_end;
217         ///
218         string language_command_begin;
219         ///
220         string language_command_end;
221         ///
222         bool rtl_support;
223         ///
224         string auto_mathmode;
225         ///
226         bool show_banner;
227         ///
228         typedef map<string, int> Bindings;
229         ///
230         Bindings bindings;
231 private:
232         ///
233         void defaultKeyBindings();
234 };
235
236 extern LyXRC lyxrc;
237
238 #endif