2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * This file copyright 1999-2000
12 *======================================================*/
14 * FormPreferences Interface Class
17 #ifndef FORMPREFERENCES_H
18 #define FORMPREFERENCES_H
29 struct FD_form_preferences;
30 struct FD_form_lnf_misc;
31 struct FD_form_screen_fonts;
32 struct FD_form_interface;
33 struct FD_form_printer;
35 struct FD_form_outer_tab;
36 struct FD_form_outputs_misc;
37 struct FD_form_spellchecker;
38 struct FD_form_language;
39 struct FD_form_colours;
41 /** This class provides an XForms implementation of the FormPreferences Dialog.
42 The preferences dialog allows users to set/save their preferences.
44 class FormPreferences : public FormBaseBI {
46 /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
47 FormPreferences(LyXView *, Dialogs *);
74 /// Update the dialog.
75 virtual void update();
82 /// Restore from dialog
83 virtual void restore();
84 /// Filter the inputs -- return true if entries are valid
85 virtual bool input(FL_OBJECT *, long);
89 virtual FL_FORM * form() const;
91 void applyInterface();
95 void applyOutputsMisc();
101 void applyScreenFonts();
103 void applySpellChecker();
107 void buildInterface();
109 void buildLanguage();
113 void buildOutputsMisc();
119 void buildScreenFonts();
121 void buildSpellchecker();
123 void feedbackInterface(FL_OBJECT const * const);
125 void feedbackLnFmisc(FL_OBJECT const * const);
127 void feedbackOutputsMisc(FL_OBJECT const * const);
129 void feedbackPaths(FL_OBJECT const * const);
131 void feedbackPrinter(FL_OBJECT const * const);
133 void feedbackScreenFonts(FL_OBJECT const * const);
135 void feedbackSpellChecker(FL_OBJECT const * const);
137 bool inputPaths(FL_OBJECT const * const);
139 bool inputScreenFonts();
141 bool inputSpellChecker(FL_OBJECT const * const);
143 void updateInterface();
145 void updateLnFmisc();
147 void updateOutputsMisc();
151 void updatePrinter();
153 void updateScreenFonts();
155 void updateSpellChecker();
158 bool WriteableDir( string const & ) const;
160 bool ReadableDir( string const & ) const;
162 bool WriteableFile( string const &, string const & = string() ) const;
165 FD_form_preferences * build_preferences();
167 FD_form_outer_tab * build_outer_tab();
169 FD_form_colours * build_colours();
171 FD_form_interface * build_interface();
173 FD_form_language * build_language();
175 FD_form_lnf_misc * build_lnf_misc();
177 FD_form_outputs_misc * build_outputs_misc();
179 FD_form_paths * build_paths();
181 FD_form_printer * build_printer();
183 FD_form_screen_fonts * build_screen_fonts();
185 FD_form_spellchecker * build_spellchecker();
187 /// Real GUI implementation.
188 FD_form_preferences * dialog_;
189 /// Outputs tabfolder
190 FD_form_outer_tab * outputs_tab_;
191 /// HCI configuration
192 FD_form_outer_tab * look_n_feel_tab_;
193 /// reLyX and other import/input stuff
194 FD_form_outer_tab * inputs_tab_;
195 /// Spellchecker, language stuff, etc
196 FD_form_outer_tab * usage_tab_;
198 FD_form_colours * colours_;
200 FD_form_interface * interface_;
202 FD_form_language * language_;
204 FD_form_lnf_misc * lnf_misc_;
206 FD_form_outputs_misc * outputs_misc_;
208 FD_form_paths * paths_;
210 FD_form_printer * printer_;
212 FD_form_screen_fonts * screen_fonts_;
214 FD_form_spellchecker * spellchecker_;