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>
20 #include "lyx_forms.h"
23 class ControlDocument;
27 class FormColorpicker;
30 struct FD_document_paper;
31 struct FD_document_class;
32 struct FD_document_language;
33 struct FD_document_options;
34 struct FD_document_bullet;
35 struct FD_document_branch;
40 GUI_COLOR_CHOICE = FL_FREE_COL15
47 /** This class provides an XForms implementation of the FormDocument dialog.
48 * The table-layout-form here changes values for latex-tabulars
50 class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
54 /** Redraw the form (on receipt of a Signal indicating, for example,
55 that the xforms colours have been re-mapped). */
56 virtual void redraw();
60 virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
61 /// Update the dialog.
62 virtual void update();
67 void branch_input(FL_OBJECT *);
69 void ChoiceBulletSize(FL_OBJECT * ob, long);
71 void InputBulletLaTeX(FL_OBJECT * ob, long);
73 void BulletDepth(FL_OBJECT * ob);
75 void BulletPanel(FL_OBJECT * ob);
77 void BulletBMTable(FL_OBJECT * ob, long);
81 void CheckChoiceClass();
83 void UpdateLayoutDocument(BufferParams const & params);
85 void UpdateClassParams(BufferParams const & params);
88 void paper_update(BufferParams const &);
90 void class_update(BufferParams const &);
92 void language_update(BufferParams const &);
94 void options_update(BufferParams const &);
96 void bullets_update(BufferParams const &);
98 void branch_update(BufferParams const &);
101 void paper_apply(BufferParams &);
103 bool class_apply(BufferParams &);
105 bool language_apply(BufferParams &);
107 bool options_apply(BufferParams &);
109 void bullets_apply(BufferParams &);
111 void branch_apply(BufferParams &);
113 /// Real GUI implementation.
114 boost::scoped_ptr<FD_document_paper> paper_;
116 boost::scoped_ptr<FD_document_class> class_;
118 boost::scoped_ptr<FD_document_language> language_;
120 boost::scoped_ptr<FD_document_options> options_;
122 boost::scoped_ptr<FD_document_bullet> bullets_;
124 boost::scoped_ptr<FD_document_branch> branch_;
126 boost::scoped_ptr<FormColorpicker> picker_;
132 int current_bullet_panel;
134 int current_bullet_depth;
138 std::vector<string> lang_;
139 /// Contains all legal branches for this doc
140 BranchList branchlist_;