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
16 #include "BranchList.h"
17 #include "RadioButtonGroup.h"
19 #include <boost/scoped_ptr.hpp>
21 #include "lyx_forms.h"
24 class ControlDocument;
28 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;
41 GUI_COLOR_CHOICE = FL_FREE_COL15
48 /** This class provides an XForms implementation of the FormDocument dialog.
49 * The table-layout-form here changes values for latex-tabulars
51 class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
55 /** Redraw the form (on receipt of a Signal indicating, for example,
56 that the xforms colours have been re-mapped). */
57 virtual void redraw();
61 virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
62 /// Update the dialog.
63 virtual void update();
68 void branch_input(FL_OBJECT *);
70 void ChoiceBulletSize(FL_OBJECT * ob, long);
72 void InputBulletLaTeX(FL_OBJECT * ob, long);
74 void BulletDepth(FL_OBJECT * ob);
76 void BulletPanel(FL_OBJECT * ob);
78 void BulletBMTable(FL_OBJECT * ob, long);
82 void CheckChoiceClass();
84 void UpdateLayoutDocument(BufferParams const & params);
86 void UpdateClassParams(BufferParams const & params);
89 void paper_update(BufferParams const &);
91 void class_update(BufferParams const &);
93 void language_update(BufferParams const &);
95 void options_update(BufferParams const &);
97 void bullets_update(BufferParams const &);
99 void branch_update(BufferParams const &);
102 void paper_apply(BufferParams &);
104 bool class_apply(BufferParams &);
106 bool language_apply(BufferParams &);
108 bool options_apply(BufferParams &);
110 void bullets_apply(BufferParams &);
112 void branch_apply(BufferParams &);
114 void rebuild_all_branches_browser();
115 void rebuild_selected_branches_browser();
117 /// Real GUI implementation.
118 boost::scoped_ptr<FD_document_paper> paper_;
120 boost::scoped_ptr<FD_document_class> class_;
122 boost::scoped_ptr<FD_document_language> language_;
124 boost::scoped_ptr<FD_document_options> options_;
126 boost::scoped_ptr<FD_document_bullet> bullets_;
128 boost::scoped_ptr<FD_document_branch> branch_;
130 boost::scoped_ptr<FormColorpicker> picker_;
136 int current_bullet_panel;
138 int current_bullet_depth;
142 std::vector<std::string> lang_;
143 /// Contains all legal branches for this doc
144 BranchList branchlist_;
146 /// citation style buttons
147 RadioButtonGroup citestyle_;