]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormDocument.h
Swap two printer related help messages.
[lyx.git] / src / frontends / xforms / FormDocument.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright (C) 2000 The LyX Team.
8  *
9  *           @author Jürgen Vigna
10  *
11  *======================================================*/
12
13 #ifndef FORM_DOCUMENT_H
14 #define FORM_DOCUMENT_H
15
16 #include "FormBase.h"
17 #include <vector>
18
19 #ifdef __GNUG_
20 #pragma interface
21 #endif
22
23 class LyXView;
24 class Dialogs;
25 class Combox;
26 class BufferParams;
27
28 struct FD_form_tabbed_document;
29 struct FD_form_doc_paper;
30 struct FD_form_doc_class;
31 struct FD_form_doc_language;
32 struct FD_form_doc_options;
33 struct FD_form_doc_bullet;
34
35 /** This class provides an XForms implementation of the FormDocument Popup.
36     The table-layout-form here changes values for latex-tabulars
37     @author Jürgen Vigna
38  */
39 class FormDocument : public FormBaseBD {
40 public:
41         /// #FormDocument x(Communicator ..., Popups ...);#
42         FormDocument(LyXView *, Dialogs *);
43         ///
44         ~FormDocument();
45         ///
46         static void ComboInputCB(int, void *, Combox *);
47
48 private:
49         ///
50         enum State {
51                 ///
52                 INPUT,
53                 ///
54                 CHECKCHOICECLASS,
55                 ///
56                 CHOICEBULLETSIZE,
57                 ///
58                 INPUTBULLETLATEX,
59                 ///
60                 BULLETDEPTH1,
61                 ///
62                 BULLETDEPTH2,
63                 ///
64                 BULLETDEPTH3,
65                 ///
66                 BULLETDEPTH4,
67                 ///
68                 BULLETPANEL1,
69                 ///
70                 BULLETPANEL2,
71                 ///
72                 BULLETPANEL3,
73                 ///
74                 BULLETPANEL4,
75                 ///
76                 BULLETPANEL5,
77                 ///
78                 BULLETPANEL6,
79                 ///
80                 BULLETBMTABLE
81         };
82         /** Redraw the form (on receipt of a Signal indicating, for example,
83             that the xform colours have been re-mapped). */
84         virtual void redraw();
85         /// Build the dialog
86         virtual void build();
87         /// Filter the inputs
88         virtual bool input( FL_OBJECT *, long );
89         /// Update the popup.
90         virtual void update();
91         /// Apply from popup
92         virtual void apply();
93         /// Cancel from popup
94         virtual void cancel();
95
96         ///
97         virtual FL_FORM * form() const;
98
99         ///
100         bool CheckDocumentInput(FL_OBJECT * ob, long);
101         ///
102         void ChoiceBulletSize(FL_OBJECT * ob, long);
103         ///
104         void InputBulletLaTeX(FL_OBJECT * ob, long);
105         ///
106         void BulletDepth(FL_OBJECT * ob, State);
107         ///
108         void BulletPanel(FL_OBJECT * ob, State);
109         ///
110         void BulletBMTable(FL_OBJECT * ob, long);
111         ///
112         void checkMarginValues();
113         ///
114         void checkReadOnly();
115         ///
116         void CheckChoiceClass(FL_OBJECT * ob, long);
117         ///
118         void UpdateLayoutDocument(BufferParams const & params);
119
120         ///
121         void paper_update(BufferParams const &);
122         ///
123         void class_update(BufferParams const &);
124         ///
125         void language_update(BufferParams const &);
126         ///
127         void options_update(BufferParams const &);
128         ///
129         void bullets_update(BufferParams const &);
130
131         ///
132         void paper_apply();
133         ///
134         bool class_apply();
135         ///
136         bool language_apply();
137         ///
138         bool options_apply();
139         ///
140         void bullets_apply();
141
142         /// Typedefinitions from the fdesign produced Header file
143         FD_form_tabbed_document * build_tabbed_document();
144         ///
145         FD_form_doc_paper * build_doc_paper();
146         ///
147         FD_form_doc_class * build_doc_class();
148         ///
149         FD_form_doc_language * build_doc_language();
150         ///
151         FD_form_doc_options * build_doc_options();
152         ///
153         FD_form_doc_bullet * build_doc_bullet();
154
155         /// Real GUI implementation.
156         FD_form_tabbed_document * dialog_;
157         ///
158         FD_form_doc_paper       * paper_;
159         ///
160         FD_form_doc_class       * class_;
161         ///
162         FD_form_doc_language    * language_;
163         ///
164         FD_form_doc_options     * options_;
165         ///
166         FD_form_doc_bullet      * bullets_;
167         ///
168         int ActCell;
169         ///
170         int Confirmed;
171         ///
172         int current_bullet_panel;
173         ///
174         int current_bullet_depth;
175         ///
176         FL_OBJECT * fbullet;
177         ///
178         Combox * combo_language;
179         ///
180         Combox * combo_doc_class;
181 };
182
183 #endif