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 class PreferencesPolicy;
30 template <class x> class ButtonController;
32 struct FD_form_preferences;
35 struct FD_form_screen_fonts;
36 struct FD_form_interface_fonts;
37 struct FD_form_printer;
40 #ifdef SIGC_CXX_NAMESPACES
41 using SigC::Connection;
44 /** This class provides an XForms implementation of the FormPreferences Dialog.
45 The preferences dialog allows users to set/save their preferences.
47 class FormPreferences : public DialogBase, public noncopyable {
49 /// #FormPreferences x(LyXFunc ..., Dialogs ...);#
50 FormPreferences(LyXView *, Dialogs *);
55 static int WMHideCB(FL_FORM *, void *);
57 static void OKCB(FL_OBJECT *, long);
59 static void ApplyCB(FL_OBJECT *, long);
61 static void CancelCB(FL_OBJECT *, long);
63 static void InputCB(FL_OBJECT *, long);
65 static void RestoreCB(FL_OBJECT *, long);
67 /// Create the dialog if necessary, update it and display it.
71 /// Update the dialog.
76 /// Filter the inputs -- return true if entries are valid
81 FD_form_preferences * build_preferences();
83 FD_form_bind * build_bind();
85 FD_form_misc * build_misc();
87 FD_form_screen_fonts * build_screen_fonts();
89 FD_form_interface_fonts * build_interface_fonts();
91 FD_form_printer * build_printer();
93 FD_form_paths * build_paths();
95 /// Real GUI implementation.
96 FD_form_preferences * dialog_;
100 FD_form_misc * misc_;
102 FD_form_screen_fonts * screen_fonts_;
104 FD_form_interface_fonts * interface_fonts_;
106 FD_form_printer * printer_;
108 FD_form_paths * paths_;
109 /// Which LyXView do we belong to?
113 /// Update connection.
117 /// Overcome a dumb xforms sizing bug
122 ButtonController<PreferencesPolicy> * bc_;