]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormDocument.h
Whitespace and formatting changes only.
[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
16 #include "FormBase.h"
17
18 #include <boost/scoped_ptr.hpp>
19
20 #include <vector>
21
22 class ControlDocument;
23
24 class Combox;
25 class BufferParams;
26
27 struct FD_document;
28 struct FD_document_paper;
29 struct FD_document_class;
30 struct FD_document_language;
31 struct FD_document_options;
32 struct FD_document_bullet;
33
34 /** This class provides an XForms implementation of the FormDocument dialog.
35  *  The table-layout-form here changes values for latex-tabulars
36  */
37 class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
38 public:
39         FormDocument();
40         ///
41         static void ComboInputCB(int, void *, Combox *);
42 private:
43         /** Redraw the form (on receipt of a Signal indicating, for example,
44             that the xforms colours have been re-mapped). */
45         virtual void redraw();
46         /// Build the dialog
47         virtual void build();
48         /// Filter the inputs
49         virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
50         /// Update the dialog.
51         virtual void update();
52         /// Apply from dialog
53         virtual void apply();
54
55         ///
56         void ChoiceBulletSize(FL_OBJECT * ob, long);
57         ///
58         void InputBulletLaTeX(FL_OBJECT * ob, long);
59         ///
60         void BulletDepth(FL_OBJECT * ob);
61         ///
62         void BulletPanel(FL_OBJECT * ob);
63         ///
64         void BulletBMTable(FL_OBJECT * ob, long);
65         ///
66         void checkReadOnly();
67         ///
68         void CheckChoiceClass();
69         ///
70         void UpdateLayoutDocument(BufferParams const & params);
71         ///
72         void UpdateClassParams(BufferParams const & params);
73
74         ///
75         void paper_update(BufferParams const &);
76         ///
77         void class_update(BufferParams const &);
78         ///
79         void language_update(BufferParams const &);
80         ///
81         void options_update(BufferParams const &);
82         ///
83         void bullets_update(BufferParams const &);
84
85         ///
86         void paper_apply(BufferParams &);
87         ///
88         bool class_apply(BufferParams &);
89         ///
90         bool language_apply(BufferParams &);
91         ///
92         bool options_apply(BufferParams &);
93         ///
94         void bullets_apply(BufferParams &);
95
96         /// Real GUI implementation.
97         boost::scoped_ptr<FD_document_paper>    paper_;
98         ///
99         boost::scoped_ptr<FD_document_class>    class_;
100         ///
101         boost::scoped_ptr<FD_document_language> language_;
102         ///
103         boost::scoped_ptr<FD_document_options>  options_;
104         ///
105         boost::scoped_ptr<FD_document_bullet>   bullets_;
106         ///
107         int ActCell;
108         ///
109         int Confirmed;
110         ///
111         int current_bullet_panel;
112         ///
113         int current_bullet_depth;
114         ///
115         FL_OBJECT * fbullet;
116         ///
117         boost::scoped_ptr<Combox> combo_language;
118         ///
119         boost::scoped_ptr<Combox> combo_doc_class;
120         ///
121         std::vector<string> lang_;
122 };
123
124 #endif