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
18 #include <boost/scoped_ptr.hpp>
22 class ControlDocument;
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 FormCB<ControlDocument, FormDB<FD_document> > {
41 static void ComboInputCB(int, void *, Combox *);
43 /** Redraw the form (on receipt of a Signal indicating, for example,
44 that the xforms colours have been re-mapped). */
45 virtual void redraw();
49 virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
50 /// Update the dialog.
51 virtual void update();
56 void ChoiceBulletSize(FL_OBJECT * ob, long);
58 void InputBulletLaTeX(FL_OBJECT * ob, long);
60 void BulletDepth(FL_OBJECT * ob);
62 void BulletPanel(FL_OBJECT * ob);
64 void BulletBMTable(FL_OBJECT * ob, long);
68 void CheckChoiceClass();
70 void UpdateLayoutDocument(BufferParams const & params);
72 void UpdateClassParams(BufferParams const & params);
75 void paper_update(BufferParams const &);
77 void class_update(BufferParams const &);
79 void language_update(BufferParams const &);
81 void options_update(BufferParams const &);
83 void bullets_update(BufferParams const &);
86 void paper_apply(BufferParams &);
88 bool class_apply(BufferParams &);
90 bool language_apply(BufferParams &);
92 bool options_apply(BufferParams &);
94 void bullets_apply(BufferParams &);
96 /// Real GUI implementation.
97 boost::scoped_ptr<FD_document_paper> paper_;
99 boost::scoped_ptr<FD_document_class> class_;
101 boost::scoped_ptr<FD_document_language> language_;
103 boost::scoped_ptr<FD_document_options> options_;
105 boost::scoped_ptr<FD_document_bullet> bullets_;
111 int current_bullet_panel;
113 int current_bullet_depth;
117 boost::scoped_ptr<Combox> combo_language;
119 boost::scoped_ptr<Combox> combo_doc_class;
121 std::vector<string> lang_;