4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
12 #ifndef FORM_DOCUMENT_H
13 #define FORM_DOCUMENT_H
19 #include "FormBaseDeprecated.h"
21 #include <boost/scoped_ptr.hpp>
29 struct FD_document_paper;
30 struct FD_document_class;
31 struct FD_document_language;
32 struct FD_document_options;
33 struct FD_document_bullet;
35 /** This class provides an XForms implementation of the FormDocument dialog.
36 The table-layout-form here changes values for latex-tabulars
38 class FormDocument : public FormBaseBD {
40 FormDocument(LyXView &, Dialogs &);
42 static void ComboInputCB(int, void *, Combox *);
44 /// Pointer to the actual instantiation of the ButtonController.
45 virtual xformsBC & bc();
46 /** Redraw the form (on receipt of a Signal indicating, for example,
47 that the xforms colours have been re-mapped). */
48 virtual void redraw();
52 virtual bool input( FL_OBJECT *, long);
53 /// Update the dialog.
54 virtual void update();
57 /// Cancel from dialog
58 virtual void cancel();
61 virtual FL_FORM * form() const;
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()