]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormDocument.h
Store the citation engine in BufferParams as biblio::CiteEngine rather
[lyx.git] / src / frontends / xforms / FormDocument.h
1 // -*- C++ -*-
2 /**
3  * \file FormDocument.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Vigna
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef FORM_DOCUMENT_H
13 #define FORM_DOCUMENT_H
14
15 #include "FormDialogView.h"
16 #include "BranchList.h"
17
18 #include <boost/scoped_ptr.hpp>
19
20 #include "lyx_forms.h"
21 #include <vector>
22
23 class ControlDocument;
24
25 class BufferParams;
26
27 class FormColorpicker;
28
29 struct FD_document;
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;
36
37 /** This class provides an XForms implementation of the FormDocument dialog.
38  *  The table-layout-form here changes values for latex-tabulars
39  */
40 class FormDocument
41         : public FormController<ControlDocument, FormView<FD_document> > {
42 public:
43         FormDocument(Dialog &);
44 private:
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();
48         /// Build the dialog
49         virtual void build();
50         /// Filter the inputs
51         virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
52         /// Update the dialog.
53         virtual void update();
54         /// Apply from dialog
55         virtual void apply();
56
57         ///
58         void branch_input(FL_OBJECT *);
59         ///
60         void ChoiceBulletSize(FL_OBJECT * ob, long);
61         ///
62         void InputBulletLaTeX(FL_OBJECT * ob, long);
63         ///
64         void BulletDepth(FL_OBJECT * ob);
65         ///
66         void BulletPanel(FL_OBJECT * ob);
67         ///
68         void BulletBMTable(FL_OBJECT * ob, long);
69         ///
70         void checkReadOnly();
71         ///
72         void CheckChoiceClass();
73         ///
74         void UpdateLayoutDocument(BufferParams const & params);
75         ///
76         void UpdateClassParams(BufferParams const & params);
77
78         ///
79         void paper_update(BufferParams const &);
80         ///
81         void class_update(BufferParams const &);
82         ///
83         void language_update(BufferParams const &);
84         ///
85         void options_update(BufferParams const &);
86         ///
87         void bullets_update(BufferParams const &);
88         ///
89         void branch_update(BufferParams const &);
90
91         ///
92         void paper_apply(BufferParams &);
93         ///
94         bool class_apply(BufferParams &);
95         ///
96         bool language_apply(BufferParams &);
97         ///
98         bool options_apply(BufferParams &);
99         ///
100         void bullets_apply(BufferParams &);
101         ///
102         void branch_apply(BufferParams &);
103
104         void rebuild_all_branches_browser();
105         void rebuild_selected_branches_browser();
106
107         /// Real GUI implementation.
108         boost::scoped_ptr<FD_document_paper>    paper_;
109         ///
110         boost::scoped_ptr<FD_document_class>    class_;
111         ///
112         boost::scoped_ptr<FD_document_language> language_;
113         ///
114         boost::scoped_ptr<FD_document_options>  options_;
115         ///
116         boost::scoped_ptr<FD_document_bullet>   bullets_;
117         ///
118         boost::scoped_ptr<FD_document_branch>   branch_;
119         ///
120         boost::scoped_ptr<FormColorpicker> picker_;
121         ///
122         int ActCell;
123         ///
124         int Confirmed;
125         ///
126         int current_bullet_panel;
127         ///
128         int current_bullet_depth;
129         ///
130         FL_OBJECT * fbullet;
131         ///
132         std::vector<std::string> lang_;
133         /// Contains all legal branches for this doc
134         BranchList branchlist_;
135 };
136
137 #endif