]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
11d680324d972bff68252d08e357d0c68e7d6da8
[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         /// A directory for storing backup files
144         string backupdir_path;
145         /// Zoom factor for screen fonts
146         unsigned int zoom;
147         /// Screen font sizes in points for each font size
148         float font_sizes[10];
149         /// Allow the use of scalable fonts? Default is yes.
150         bool use_scalable_fonts;
151         /// DPI of monitor
152         float dpi;
153         ///
154         string fontenc;
155         ///
156         string roman_font_name;
157         ///
158         string sans_font_name;
159         ///
160         string typewriter_font_name;
161         ///
162         string menu_font_name;
163         ///
164         string popup_font_name;
165         ///
166         string font_norm;
167         ///
168         string font_norm_menu;
169         ///
170         unsigned int autosave;
171         ///
172         string fax_command;
173         ///
174         string phone_book;
175         ///
176         string fax_program;
177         ///
178         string ascii_roff_command;
179         ///
180         unsigned int ascii_linelen;
181         /// Ispell command
182         string isp_command;
183         /// Accept compound words in spellchecker?
184         bool isp_accept_compound;
185         /// Pass input encoding switch to ispell?
186         bool isp_use_input_encoding;
187         /// Use alternate language?
188         bool isp_use_alt_lang;
189         /// Use personal dictionary?
190         bool isp_use_pers_dict;
191         /// Use escape chars?
192         bool isp_use_esc_chars;
193         /// Alternate language for ispell
194         string isp_alt_lang;
195         /// Alternate personal dictionary file for ispell
196         string isp_pers_dict;
197         /// Escape characters
198         string isp_esc_chars;
199         ///
200         bool use_kbmap;
201         /// Ask for confirmation of exit when there are unsaved documents?
202         bool exit_confirmation;
203         /// Should we display short-cut information in the minibuffer?
204         bool display_shortcuts;
205         ///
206         string primary_kbmap;
207         ///
208         string secondary_kbmap;
209         ///
210         string lyxpipes;
211         ///
212         string date_insert_format;
213         ///
214         string language_package;
215         ///
216         bool language_auto_begin;
217         ///
218         bool language_auto_end;
219         ///
220         string language_command_begin;
221         ///
222         string language_command_end;
223         ///
224         bool rtl_support;
225         ///
226         string auto_mathmode;
227         ///
228         bool show_banner;
229         /// Do we have to use a GUI?
230         bool use_gui;
231         ///
232         typedef map<string, int> Bindings;
233         ///
234         Bindings bindings;
235 private:
236         ///
237         void defaultKeyBindings();
238 };
239
240 extern LyXRC lyxrc;
241
242 #endif