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"
28 class ControlDocument;
29 class FormColorpicker;
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;
36 struct FD_document_branch;
38 /** This class provides an XForms implementation of the FormDocument dialog.
39 * The table-layout-form here changes values for latex-tabulars
42 : public FormController<ControlDocument, FormView<FD_document> > {
44 FormDocument(Dialog &);
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 branch_input(FL_OBJECT *);
61 void ChoiceBulletSize(FL_OBJECT * ob, long);
63 void InputBulletLaTeX(FL_OBJECT * ob, long);
65 void BulletDepth(FL_OBJECT * ob);
67 void BulletPanel(FL_OBJECT * ob);
69 void BulletBMTable(FL_OBJECT * ob, long);
73 void CheckChoiceClass();
75 void UpdateLayoutDocument(BufferParams const & params);
77 void UpdateClassParams(BufferParams const & params);
80 void paper_update(BufferParams const &);
82 void class_update(BufferParams const &);
84 void language_update(BufferParams const &);
86 void options_update(BufferParams const &);
88 void bullets_update(BufferParams const &);
90 void branch_update(BufferParams const &);
93 void paper_apply(BufferParams &);
95 bool class_apply(BufferParams &);
97 bool language_apply(BufferParams &);
99 bool options_apply(BufferParams &);
101 void bullets_apply(BufferParams &);
103 void branch_apply(BufferParams &);
105 void rebuild_all_branches_browser();
106 void rebuild_selected_branches_browser();
108 /// Real GUI implementation.
109 boost::scoped_ptr<FD_document_paper> paper_;
111 boost::scoped_ptr<FD_document_class> class_;
113 boost::scoped_ptr<FD_document_language> language_;
115 boost::scoped_ptr<FD_document_options> options_;
117 boost::scoped_ptr<FD_document_bullet> bullets_;
119 boost::scoped_ptr<FD_document_branch> branch_;
121 boost::scoped_ptr<FormColorpicker> picker_;
127 int current_bullet_panel;
129 int current_bullet_depth;
133 std::vector<std::string> lang_;
134 /// Contains all legal branches for this doc
135 BranchList branchlist_;
138 } // namespace frontend