4 * Copyright 2000-2002 the LyX Team
5 * Read the file COPYING
7 * \author Jürgen Vigna, jug@sad.it
10 #ifndef FORM_DOCUMENT_H
11 #define FORM_DOCUMENT_H
17 #include "FormBaseDeprecated.h"
19 #include <boost/scoped_ptr.hpp>
27 struct FD_document_paper;
28 struct FD_document_class;
29 struct FD_document_language;
30 struct FD_document_options;
31 struct FD_document_bullet;
33 /** This class provides an XForms implementation of the FormDocument dialog.
34 The table-layout-form here changes values for latex-tabulars
36 class FormDocument : public FormBaseBD {
38 FormDocument(LyXView *, Dialogs *);
40 static void ComboInputCB(int, void *, Combox *);
42 /// Pointer to the actual instantiation of the ButtonController.
43 virtual xformsBC & bc();
44 /** Redraw the form (on receipt of a Signal indicating, for example,
45 that the xforms colours have been re-mapped). */
46 virtual void redraw();
50 virtual bool input( FL_OBJECT *, long);
51 /// Update the dialog.
52 virtual void update();
55 /// Cancel from dialog
56 virtual void cancel();
59 virtual FL_FORM * form() const;
62 bool CheckDocumentInput(FL_OBJECT * ob, long);
64 void ChoiceBulletSize(FL_OBJECT * ob, long);
66 void InputBulletLaTeX(FL_OBJECT * ob, long);
68 void BulletDepth(FL_OBJECT * ob);
70 void BulletPanel(FL_OBJECT * ob);
72 void BulletBMTable(FL_OBJECT * ob, long);
76 void CheckChoiceClass(FL_OBJECT * ob, long);
78 void UpdateLayoutDocument(BufferParams const & params);
80 void UpdateClassParams(BufferParams const & params);
83 void paper_update(BufferParams const &);
85 void class_update(BufferParams const &);
87 void language_update(BufferParams const &);
89 void options_update(BufferParams const &);
91 void bullets_update(BufferParams const &);
94 void paper_apply(BufferParams &);
96 bool class_apply(BufferParams &);
98 bool language_apply(BufferParams &);
100 bool options_apply(BufferParams &);
102 void bullets_apply(BufferParams &);
109 bool language_apply();
111 bool options_apply();
113 void bullets_apply();
115 /// Real GUI implementation.
116 boost::scoped_ptr<FD_document> dialog_;
118 boost::scoped_ptr<FD_document_paper> paper_;
120 boost::scoped_ptr<FD_document_class> class_;
122 boost::scoped_ptr<FD_document_language> language_;
124 boost::scoped_ptr<FD_document_options> options_;
126 boost::scoped_ptr<FD_document_bullet> bullets_;
132 int current_bullet_panel;
134 int current_bullet_depth;
138 boost::scoped_ptr<Combox> combo_language;
140 boost::scoped_ptr<Combox> combo_doc_class;
141 /// The ButtonController
142 ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
144 std::vector<string> lang_;
149 xformsBC & FormDocument::bc()