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