2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * This file copyright 1999-2000
12 *======================================================*/
14 * FormPreferences Interface Class
17 #ifndef FORMPREFERENCES_H
18 #define FORMPREFERENCES_H
20 #include "DialogBase.h"
21 #include "support/utility.hpp"
29 struct FD_form_preferences;
32 struct FD_form_screen_fonts;
33 struct FD_form_interface_fonts;
34 struct FD_form_printer;
37 #ifdef SIGC_CXX_NAMESPACES
38 using SigC::Connection;
41 /** This class provides an XForms implementation of the FormPreferences Dialog.
42 The preferences dialog allows users to set/save their preferences.
44 class FormPreferences : public DialogBase, public noncopyable {
46 /**@name Constructors and Destructors */
48 /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
49 FormPreferences(LyXView *, Dialogs *);
54 /**@name Real per-instance Callback Methods */
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);
64 /**@name Slot Methods */
66 /// Create the dialog if necessary, update it and display it.
70 /// Update the dialog.
74 /**@name Dialog internal methods */
83 FD_form_preferences * build_preferences();
85 FD_form_bind * build_bind();
87 FD_form_misc * build_misc();
89 FD_form_screen_fonts * build_screen_fonts();
91 FD_form_interface_fonts * build_interface_fonts();
93 FD_form_printer * build_printer();
95 FD_form_paths * build_paths();
96 /// Explicitly free the dialog.
100 /**@name Private Data */
102 /// Real GUI implementation.
103 FD_form_preferences * dialog_;
105 FD_form_bind * bind_;
107 FD_form_misc * misc_;
109 FD_form_screen_fonts * screen_fonts_;
111 FD_form_interface_fonts * interface_fonts_;
113 FD_form_printer * printer_;
115 FD_form_paths * paths_;
116 /// Which LyXView do we belong to?
119 /// Update connection.
124 EnumDialogStatus status;