4 * Read the file COPYING
8 * Full author contact details are available in file CREDITS
11 #ifndef FORM_DOCUMENT_H
12 #define FORM_DOCUMENT_H
18 #include "FormBaseDeprecated.h"
20 #include <boost/scoped_ptr.hpp>
28 struct FD_document_paper;
29 struct FD_document_class;
30 struct FD_document_language;
31 struct FD_document_options;
32 struct FD_document_bullet;
34 /** This class provides an XForms implementation of the FormDocument dialog.
35 The table-layout-form here changes values for latex-tabulars
37 class FormDocument : public FormBaseBD {
39 FormDocument(LyXView &, Dialogs &);
41 static void ComboInputCB(int, void *, Combox *);
43 /// Pointer to the actual instantiation of the ButtonController.
44 virtual xformsBC & bc();
45 /** Redraw the form (on receipt of a Signal indicating, for example,
46 that the xforms colours have been re-mapped). */
47 virtual void redraw();
51 virtual bool input( FL_OBJECT *, long);
52 /// Update the dialog.
53 virtual void update();
56 /// Cancel from dialog
57 virtual void cancel();
60 virtual FL_FORM * form() const;
63 bool CheckDocumentInput(FL_OBJECT * ob, long);
65 void ChoiceBulletSize(FL_OBJECT * ob, long);
67 void InputBulletLaTeX(FL_OBJECT * ob, long);
69 void BulletDepth(FL_OBJECT * ob);
71 void BulletPanel(FL_OBJECT * ob);
73 void BulletBMTable(FL_OBJECT * ob, long);
77 void CheckChoiceClass(FL_OBJECT * ob, long);
79 void UpdateLayoutDocument(BufferParams const & params);
81 void UpdateClassParams(BufferParams const & params);
84 void paper_update(BufferParams const &);
86 void class_update(BufferParams const &);
88 void language_update(BufferParams const &);
90 void options_update(BufferParams const &);
92 void bullets_update(BufferParams const &);
95 void paper_apply(BufferParams &);
97 bool class_apply(BufferParams &);
99 bool language_apply(BufferParams &);
101 bool options_apply(BufferParams &);
103 void bullets_apply(BufferParams &);
110 bool language_apply();
112 bool options_apply();
114 void bullets_apply();
116 /// Real GUI implementation.
117 boost::scoped_ptr<FD_document> dialog_;
119 boost::scoped_ptr<FD_document_paper> paper_;
121 boost::scoped_ptr<FD_document_class> class_;
123 boost::scoped_ptr<FD_document_language> language_;
125 boost::scoped_ptr<FD_document_options> options_;
127 boost::scoped_ptr<FD_document_bullet> bullets_;
133 int current_bullet_panel;
135 int current_bullet_depth;
139 boost::scoped_ptr<Combox> combo_language;
141 boost::scoped_ptr<Combox> combo_doc_class;
142 /// The ButtonController
143 ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
145 std::vector<string> lang_;
150 xformsBC & FormDocument::bc()