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