]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormPreferences.h
more FILMagain stuff
[features.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 "DialogBase.h"
21 #include "form_preferences.h"
22 #ifdef SIGC_CXX_NAMESPACES
23 using SigC::Connection;
24 #endif
25
26 class LyXView;
27 class Dialogs;
28
29 /** This class provides an XForms implementation of the FormPreferences Dialog.
30     The preferences dialog allows users to set/save their preferences.
31  */
32 class FormPreferences : public DialogBase {
33 public:
34         /**@name Constructors and Destructors */
35         //@{
36         /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
37         FormPreferences(LyXView *, Dialogs *);
38         ///
39         ~FormPreferences();
40         //@}
41
42         /**@name Real per-instance Callback Methods */
43         //@{
44         static  int WMHideCB(FL_FORM *, void *);
45         static void OKCB(FL_OBJECT *, long);
46         static void ApplyCB(FL_OBJECT *, long);
47         static void CancelCB(FL_OBJECT *, long);
48         static void InputCB(FL_OBJECT *, long);
49         //@}
50
51 private:
52         FormPreferences() {}
53         FormPreferences(FormPreferences &) : DialogBase() {}
54
55         /**@name Slot Methods */
56         //@{
57         /// Create the dialog if necessary, update it and display it.
58         void show();
59         /// Hide the dialog.
60         void hide();
61         /// Update the dialog.
62         void update();
63         //@}
64
65         /**@name Dialog internal methods */
66         //@{
67         /// Apply from dialog
68         void apply();
69         /// Filter the inputs
70         void input();
71         /// Build the dialog
72         void build();
73         ///
74         FD_form_preferences * build_preferences();
75         ///
76         FD_form_bind * build_bind();
77         ///
78         FD_form_misc * build_misc();
79         ///
80         FD_form_screen_fonts * build_screen_fonts();
81         ///
82         FD_form_interface_fonts * build_interface_fonts();
83         ///
84         FD_form_printer * build_printer();
85         ///
86         FD_form_paths * build_paths();
87         /// Explicitly free the dialog.
88         void free();
89         //@}
90
91         /**@name Private Data */
92         //@{
93         /// Real GUI implementation.
94         FD_form_preferences * dialog_;
95         ///
96         FD_form_bind * bind_;
97         ///
98         FD_form_misc * misc_;
99         ///
100         FD_form_screen_fonts * screen_fonts_;
101         ///
102         FD_form_interface_fonts * interface_fonts_;
103         ///
104         FD_form_printer * printer_;
105         ///
106         FD_form_paths * paths_;
107         /// Which LyXView do we belong to?
108         LyXView * lv_;
109         Dialogs * d_;
110         /// Update connection.
111         Connection u_;
112         /// Hide connection.
113         Connection h_;
114         //@}
115 };
116
117 #endif