]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPreferences.h
dc37401c08fc08ff2400935792450587b385b16e
[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_bind;
31 struct FD_form_misc;
32 struct FD_form_screen_fonts;
33 struct FD_form_interface_fonts;
34 struct FD_form_printer;
35 struct FD_form_paths;
36
37 /** This class provides an XForms implementation of the FormPreferences Dialog.
38     The preferences dialog allows users to set/save their preferences.
39  */
40 class FormPreferences : public FormBase {
41 public:
42         /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
43         FormPreferences(LyXView *, Dialogs *);
44         ///
45         ~FormPreferences();
46 private:
47         ///
48         virtual void connect();
49         /// Update the dialog.
50         virtual void update();
51         /// OK from dialog
52         virtual void ok();
53         /// Apply from dialog
54         virtual void apply();
55         /// Restore from dialog
56         virtual void restore();
57         /// Filter the inputs -- return true if entries are valid
58         virtual bool input(long);
59         /// Build the dialog
60         virtual void build();
61         ///
62         virtual FL_FORM * const form() const;
63         ///
64         FD_form_preferences * build_preferences();
65         ///
66         FD_form_bind * build_bind();
67         ///
68         FD_form_misc * build_misc();
69         ///
70         FD_form_screen_fonts * build_screen_fonts();
71         ///
72         FD_form_interface_fonts * build_interface_fonts();
73         ///
74         FD_form_printer * build_printer();
75         ///
76         FD_form_paths * build_paths();
77
78         /// Real GUI implementation.
79         FD_form_preferences * dialog_;
80         ///
81         FD_form_bind * bind_;
82         ///
83         FD_form_misc * misc_;
84         ///
85         FD_form_screen_fonts * screen_fonts_;
86         ///
87         FD_form_interface_fonts * interface_fonts_;
88         ///
89         FD_form_printer * printer_;
90         ///
91         FD_form_paths * paths_;
92         /// Overcome a dumb xforms sizing bug
93         int minw_;
94         ///
95         int minh_;
96 };
97
98 #endif