]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPreferences.h
a3401e7bf0f6de66469c7c84fc529ad8a926c432
[lyx.git] / src / frontends / xforms / FormPreferences.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  *          This file copyright 1999-2000
11  *          Allan Rae
12  *======================================================*/
13 /* FormPreferences.h
14  * FormPreferences Interface Class
15  */
16
17 #ifndef FORMPREFERENCES_H
18 #define FORMPREFERENCES_H
19
20 #include "FormBase.h"
21
22 #ifdef __GNUG_
23 #pragma interface
24 #endif
25
26 class LyXView;
27 class Dialogs;
28
29 struct FD_form_preferences;
30 struct FD_form_lnf_general;
31 struct FD_form_screen_fonts;
32 struct FD_form_interface;
33 struct FD_form_printer;
34 struct FD_form_paths;
35 struct FD_form_outer_tab;
36 struct FD_form_outputs_general;
37 struct FD_form_spellchecker;
38
39 /** This class provides an XForms implementation of the FormPreferences Dialog.
40     The preferences dialog allows users to set/save their preferences.
41  */
42 class FormPreferences : public FormBaseBI {
43 public:
44         /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
45         FormPreferences(LyXView *, Dialogs *);
46         ///
47         ~FormPreferences();
48 private:
49         /// Update the dialog.
50         virtual void update();
51         ///
52         virtual void hide();
53         /// OK from dialog
54         virtual void ok();
55         /// Apply from dialog
56         virtual void apply();
57         /// Restore from dialog
58         virtual void restore();
59         /// Filter the inputs -- return true if entries are valid
60         virtual bool input(FL_OBJECT *, long);
61         /// Build the dialog
62         virtual void build();
63         ///
64         virtual FL_FORM * form() const;
65         ///
66         void applySpellChecker();
67         ///
68         void updateSpellChecker();
69         ///
70         bool inputSpellChecker();
71         ///
72         FD_form_preferences * build_preferences();
73         ///
74         FD_form_outer_tab * build_outer_tab();
75         ///
76         FD_form_lnf_general * build_lnf_general();
77         ///
78         FD_form_screen_fonts * build_screen_fonts();
79         ///
80         FD_form_interface * build_interface();
81         ///
82         FD_form_printer * build_printer();
83         ///
84         FD_form_paths * build_paths();
85         ///
86         FD_form_outputs_general * build_outputs_general();
87         ///
88         FD_form_spellchecker * build_spellchecker();
89
90         /// Real GUI implementation.
91         FD_form_preferences * dialog_;
92         /// Outputs tabfolder
93         FD_form_outer_tab * outputs_tab_;
94         /// HCI configuration
95         FD_form_outer_tab * look_n_feel_tab_;
96         /// reLyX and other import/input stuff
97         FD_form_outer_tab * inputs_tab_;
98         ///
99         FD_form_spellchecker * spellchecker_tab_;
100         ///
101         FD_form_lnf_general * lnf_general_;
102         ///
103         FD_form_screen_fonts * screen_fonts_;
104         ///
105         FD_form_interface * interface_;
106         ///
107         FD_form_printer * printer_;
108         ///
109         FD_form_paths * paths_;
110         ///
111         FD_form_outputs_general * outputs_general_;
112 };
113
114 #endif