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