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 bool CheckDocumentInput(FL_OBJECT * ob, long);
66 void ChoiceBulletSize(FL_OBJECT * ob, long);
68 void InputBulletLaTeX(FL_OBJECT * ob, long);
70 void BulletDepth(FL_OBJECT * ob);
72 void BulletPanel(FL_OBJECT * ob);
74 void BulletBMTable(FL_OBJECT * ob, long);
78 void CheckChoiceClass(FL_OBJECT * ob, long);
80 void UpdateLayoutDocument(BufferParams const & params);
82 void UpdateClassParams(BufferParams const & params);
85 void paper_update(BufferParams const &);
87 void class_update(BufferParams const &);
89 void language_update(BufferParams const &);
91 void options_update(BufferParams const &);
93 void bullets_update(BufferParams const &);
96 void paper_apply(BufferParams &);
98 bool class_apply(BufferParams &);
100 bool language_apply(BufferParams &);
102 bool options_apply(BufferParams &);
104 void bullets_apply(BufferParams &);
111 bool language_apply();
113 bool options_apply();
115 void bullets_apply();
117 /// Real GUI implementation.
118 boost::scoped_ptr<FD_document> dialog_;
120 boost::scoped_ptr<FD_document_paper> paper_;
122 boost::scoped_ptr<FD_document_class> class_;
124 boost::scoped_ptr<FD_document_language> language_;
126 boost::scoped_ptr<FD_document_options> options_;
128 boost::scoped_ptr<FD_document_bullet> bullets_;
134 int current_bullet_panel;
136 int current_bullet_depth;
140 boost::scoped_ptr<Combox> combo_language;
142 boost::scoped_ptr<Combox> combo_doc_class;
143 /// The ButtonController
144 ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
146 std::vector<string> lang_;
151 xformsBC & FormDocument::bc()