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
21 #include <boost/scoped_ptr.hpp>
25 class ControlDocument;
31 struct FD_document_paper;
32 struct FD_document_class;
33 struct FD_document_language;
34 struct FD_document_options;
35 struct FD_document_bullet;
37 /** This class provides an XForms implementation of the FormDocument dialog.
38 The table-layout-form here changes values for latex-tabulars
40 class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
44 static void ComboInputCB(int, void *, Combox *);
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 ButtonPolicy::SMInput input( FL_OBJECT *, long);
53 /// Update the dialog.
54 virtual void update();
59 void ChoiceBulletSize(FL_OBJECT * ob, long);
61 void InputBulletLaTeX(FL_OBJECT * ob, long);
63 void BulletDepth(FL_OBJECT * ob);
65 void BulletPanel(FL_OBJECT * ob);
67 void BulletBMTable(FL_OBJECT * ob, long);
71 void CheckChoiceClass();
73 void UpdateLayoutDocument(BufferParams const & params);
75 void UpdateClassParams(BufferParams const & params);
78 void paper_update(BufferParams const &);
80 void class_update(BufferParams const &);
82 void language_update(BufferParams const &);
84 void options_update(BufferParams const &);
86 void bullets_update(BufferParams const &);
89 void paper_apply(BufferParams &);
91 bool class_apply(BufferParams &);
93 bool language_apply(BufferParams &);
95 bool options_apply(BufferParams &);
97 void bullets_apply(BufferParams &);
99 /// Real GUI implementation.
100 boost::scoped_ptr<FD_document_paper> paper_;
102 boost::scoped_ptr<FD_document_class> class_;
104 boost::scoped_ptr<FD_document_language> language_;
106 boost::scoped_ptr<FD_document_options> options_;
108 boost::scoped_ptr<FD_document_bullet> bullets_;
114 int current_bullet_panel;
116 int current_bullet_depth;
120 boost::scoped_ptr<Combox> combo_language;
122 boost::scoped_ptr<Combox> combo_doc_class;
124 std::vector<string> lang_;