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
15 #include "FormDialogView.h"
16 #include "BranchList.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;
37 /** This class provides an XForms implementation of the FormDocument dialog.
38 * The table-layout-form here changes values for latex-tabulars
41 : public FormController<ControlDocument, FormView<FD_document> > {
43 FormDocument(Dialog &);
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 ButtonPolicy::SMInput input( FL_OBJECT *, long);
52 /// Update the dialog.
53 virtual void update();
58 void branch_input(FL_OBJECT *);
60 void ChoiceBulletSize(FL_OBJECT * ob, long);
62 void InputBulletLaTeX(FL_OBJECT * ob, long);
64 void BulletDepth(FL_OBJECT * ob);
66 void BulletPanel(FL_OBJECT * ob);
68 void BulletBMTable(FL_OBJECT * ob, long);
72 void CheckChoiceClass();
74 void UpdateLayoutDocument(BufferParams const & params);
76 void UpdateClassParams(BufferParams const & params);
79 void paper_update(BufferParams const &);
81 void class_update(BufferParams const &);
83 void language_update(BufferParams const &);
85 void options_update(BufferParams const &);
87 void bullets_update(BufferParams const &);
89 void branch_update(BufferParams const &);
92 void paper_apply(BufferParams &);
94 bool class_apply(BufferParams &);
96 bool language_apply(BufferParams &);
98 bool options_apply(BufferParams &);
100 void bullets_apply(BufferParams &);
102 void branch_apply(BufferParams &);
104 void rebuild_all_branches_browser();
105 void rebuild_selected_branches_browser();
107 /// Real GUI implementation.
108 boost::scoped_ptr<FD_document_paper> paper_;
110 boost::scoped_ptr<FD_document_class> class_;
112 boost::scoped_ptr<FD_document_language> language_;
114 boost::scoped_ptr<FD_document_options> options_;
116 boost::scoped_ptr<FD_document_bullet> bullets_;
118 boost::scoped_ptr<FD_document_branch> branch_;
120 boost::scoped_ptr<FormColorpicker> picker_;
126 int current_bullet_panel;
128 int current_bullet_depth;
132 std::vector<std::string> lang_;
133 /// Contains all legal branches for this doc
134 BranchList branchlist_;