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