]> git.lyx.org Git - lyx.git/blob - src/lyxrc.h
Various fixes, removed "default" language, inserted new lyxrc tag
[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 "support/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         /// program for running latex
88         string latex_command;
89         ///
90         string pdflatex_command;
91         ///
92         string pdf_to_ps_command;
93         ///
94         string dvi_to_ps_command;
95         /// program for performing literate programming
96         string literate_command;
97         ///
98         string literate_extension;
99         ///
100         string literate_error_filter;
101         /// program for compiling
102         string build_command;
103         ///
104         string build_error_filter;
105         /// program for running relyx
106         string relyx_command;
107         /// postscript interpreter (in general "gs", if it is installed)
108         string ps_command;
109         /// program for viewing postscript output (default "ghostview -swap")
110         string view_ps_command;
111         /// program for viewing postscript pictures (default "ghostview")
112         string view_pspic_command;
113         /// program for viewing dvi output (default "xdvi")
114         string view_dvi_command;
115         /// option for telling the dvi viewer about the paper size
116         string view_dvi_paper_option;
117         /// program for viewing pdf output (default "xpdf")
118         string view_pdf_command;
119         /// default paper size for local xdvi/dvips/ghostview/whatever
120         BufferParams::PAPER_SIZE default_papersize;
121         /// command to run chktex incl. options
122         string chktex_command;
123         /// command to run an html converter incl. options
124         string html_command;
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         /// parameter for button_4 and button_5 (scrollwheel)
148         unsigned int wheel_jump;
149         /// Screen font sizes in points for each font size
150         float font_sizes[10];
151         /// Allow the use of scalable fonts? Default is yes.
152         bool use_scalable_fonts;
153         /// DPI of monitor
154         float dpi;
155         /// Whether lyx should handle deadkeys by itself
156         bool override_x_deadkeys;
157         ///
158         string fontenc;
159         ///
160         string roman_font_name;
161         ///
162         string sans_font_name;
163         ///
164         string typewriter_font_name;
165         ///
166         string menu_font_name;
167         ///
168         string popup_font_name;
169         ///
170         string font_norm;
171         ///
172         enum FontEncoding {
173                 ///
174                 ISO_10646_1,
175                 ///
176                 ISO_8859_6_8,
177                 ///
178                 OTHER_ENCODING
179         };
180         ///
181         FontEncoding font_norm_type;
182         ///
183         void set_font_norm_type();
184         ///
185         string font_norm_menu;
186         ///
187         unsigned int autosave;
188         ///
189         string fax_command;
190         ///
191         string phone_book;
192         ///
193         string fax_program;
194         ///
195         string ascii_roff_command;
196         ///
197         unsigned int ascii_linelen;
198         /// Ispell command
199         string isp_command;
200         /// Accept compound words in spellchecker?
201         bool isp_accept_compound;
202         /// Pass input encoding switch to ispell?
203         bool isp_use_input_encoding;
204         /// Use alternate language?
205         bool isp_use_alt_lang;
206         /// Use personal dictionary?
207         bool isp_use_pers_dict;
208         /// Use escape chars?
209         bool isp_use_esc_chars;
210         /// Alternate language for ispell
211         string isp_alt_lang;
212         /// Alternate personal dictionary file for ispell
213         string isp_pers_dict;
214         /// Escape characters
215         string isp_esc_chars;
216         ///
217         bool use_kbmap;
218         /// Ask for confirmation of exit when there are unsaved documents?
219         bool exit_confirmation;
220         /// Should we display short-cut information in the minibuffer?
221         bool display_shortcuts;
222         ///
223         string primary_kbmap;
224         ///
225         string secondary_kbmap;
226         ///
227         string lyxpipes;
228         ///
229         string date_insert_format;
230         ///
231         string language_package;
232         ///
233         bool language_auto_begin;
234         ///
235         bool language_auto_end;
236         ///
237         string language_command_begin;
238         ///
239         string language_command_end;
240         ///
241         bool rtl_support;
242         ///
243         bool auto_number;
244         ///
245         bool mark_foreign_language;
246         ///
247         bool show_banner;
248         /// Do we have to use a GUI?
249         bool use_gui;
250         ///
251         string linuxdoc_to_lyx_command;
252         ///
253         string linuxdoc_to_html_command;
254         ///
255         string linuxdoc_to_latex_command;
256         ///
257         string docbook_to_dvi_command;
258         ///
259         string docbook_to_html_command;
260         ///
261         string docbook_to_pdf_command;
262         ///
263         bool new_ask_filename;
264         ///
265         string default_language;
266 };
267
268 ///
269 extern LyXRC lyxrc;
270 ///
271 //extern LyXRC system_lyxrc;
272 #endif