]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormDocument.h
Use a control-view split for the xforms document dialog.
[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 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "FormBase.h"
20
21 #include <boost/scoped_ptr.hpp>
22
23 #include <vector>
24
25 class ControlDocument;
26
27 class Combox;
28 class BufferParams;
29
30 struct FD_document;
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
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 : public FormCB<ControlDocument, FormDB<FD_document> > {
41 public:
42         FormDocument();
43         ///
44         static void ComboInputCB(int, void *, Combox *);
45 private:
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();
49         /// Build the dialog
50         virtual void build();
51         /// Filter the inputs
52         virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
53         /// Update the dialog.
54         virtual void update();
55         /// Apply from dialog
56         virtual void apply();
57
58         ///
59         void ChoiceBulletSize(FL_OBJECT * ob, long);
60         ///
61         void InputBulletLaTeX(FL_OBJECT * ob, long);
62         ///
63         void BulletDepth(FL_OBJECT * ob);
64         ///
65         void BulletPanel(FL_OBJECT * ob);
66         ///
67         void BulletBMTable(FL_OBJECT * ob, long);
68         ///
69         void checkReadOnly();
70         ///
71         void CheckChoiceClass();
72         ///
73         void UpdateLayoutDocument(BufferParams const & params);
74         ///
75         void UpdateClassParams(BufferParams const & params);
76
77         ///
78         void paper_update(BufferParams const &);
79         ///
80         void class_update(BufferParams const &);
81         ///
82         void language_update(BufferParams const &);
83         ///
84         void options_update(BufferParams const &);
85         ///
86         void bullets_update(BufferParams const &);
87
88         ///
89         void paper_apply(BufferParams &);
90         ///
91         bool class_apply(BufferParams &);
92         ///
93         bool language_apply(BufferParams &);
94         ///
95         bool options_apply(BufferParams &);
96         ///
97         void bullets_apply(BufferParams &);
98
99         /// Real GUI implementation.
100         boost::scoped_ptr<FD_document_paper>    paper_;
101         ///
102         boost::scoped_ptr<FD_document_class>    class_;
103         ///
104         boost::scoped_ptr<FD_document_language> language_;
105         ///
106         boost::scoped_ptr<FD_document_options>  options_;
107         ///
108         boost::scoped_ptr<FD_document_bullet>   bullets_;
109         ///
110         int ActCell;
111         ///
112         int Confirmed;
113         ///
114         int current_bullet_panel;
115         ///
116         int current_bullet_depth;
117         ///
118         FL_OBJECT * fbullet;
119         ///
120         boost::scoped_ptr<Combox> combo_language;
121         ///
122         boost::scoped_ptr<Combox> combo_doc_class;
123         ///
124         std::vector<string> lang_;
125 };
126
127 #endif