]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPreferences.h
Angus's FormInset work; Dekel's languages patch; my reworking of Angus's stuff +...
[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
38 /** This class provides an XForms implementation of the FormPreferences Dialog.
39     The preferences dialog allows users to set/save their preferences.
40  */
41 class FormPreferences : public FormBaseBI {
42 public:
43         /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
44         FormPreferences(LyXView *, Dialogs *);
45         ///
46         ~FormPreferences();
47 private:
48         ///
49         virtual void connect();
50         /// Update the dialog.
51         virtual void update(bool = false);
52         ///
53         virtual void hide();
54         /// OK from dialog
55         virtual void ok();
56         /// Apply from dialog
57         virtual void apply();
58         /// Restore from dialog
59         virtual void restore();
60         /// Filter the inputs -- return true if entries are valid
61         virtual bool input(FL_OBJECT *, long);
62         /// Build the dialog
63         virtual void build();
64         ///
65         virtual FL_FORM * form() const;
66         ///
67         FD_form_preferences * build_preferences();
68         ///
69         FD_form_outer_tab * build_outer_tab();
70         ///
71         FD_form_lnf_general * build_lnf_general();
72         ///
73         FD_form_screen_fonts * build_screen_fonts();
74         ///
75         FD_form_interface * build_interface();
76         ///
77         FD_form_printer * build_printer();
78         ///
79         FD_form_paths * build_paths();
80         ///
81         FD_form_outputs_general * build_outputs_general();
82
83         /// Real GUI implementation.
84         FD_form_preferences * dialog_;
85         /// Outputs tabfolder
86         FD_form_outer_tab * outputs_tab_;
87         /// HCI configuration
88         FD_form_outer_tab * look_n_feel_tab_;
89         /// reLyX and other import/input stuff
90         FD_form_outer_tab * inputs_tab_;
91         ///
92         FD_form_lnf_general * lnf_general_;
93         ///
94         FD_form_screen_fonts * screen_fonts_;
95         ///
96         FD_form_interface * interface_;
97         ///
98         FD_form_printer * printer_;
99         ///
100         FD_form_paths * paths_;
101         ///
102         FD_form_outputs_general * outputs_general_;
103         /// Overcome a dumb xforms sizing bug
104         int minw_;
105         ///
106         int minh_;
107 };
108
109 #endif