2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 2000 The LyX Team.
11 *======================================================*/
13 #ifndef FORM_DOCUMENT_H
14 #define FORM_DOCUMENT_H
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;
35 /** This class provides an XForms implementation of the FormDocument Popup.
36 The table-layout-form here changes values for latex-tabulars
39 class FormDocument : public FormBaseBD {
41 /// #FormDocument x(Communicator ..., Popups ...);#
42 FormDocument(LyXView *, Dialogs *);
46 static void ComboInputCB(int, void *, Combox *);
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();
88 virtual bool input( FL_OBJECT *, long );
90 virtual void update();
94 virtual void cancel();
97 virtual FL_FORM * form() const;
100 bool CheckDocumentInput(FL_OBJECT * ob, long);
102 void ChoiceBulletSize(FL_OBJECT * ob, long);
104 void InputBulletLaTeX(FL_OBJECT * ob, long);
106 void BulletDepth(FL_OBJECT * ob, State);
108 void BulletPanel(FL_OBJECT * ob, State);
110 void BulletBMTable(FL_OBJECT * ob, long);
112 void checkMarginValues();
114 void checkReadOnly();
116 void CheckChoiceClass(FL_OBJECT * ob, long);
118 void UpdateLayoutDocument(BufferParams const & params);
121 void paper_update(BufferParams const &);
123 void class_update(BufferParams const &);
125 void language_update(BufferParams const &);
127 void options_update(BufferParams const &);
129 void bullets_update(BufferParams const &);
136 bool language_apply();
138 bool options_apply();
140 void bullets_apply();
142 /// Typedefinitions from the fdesign produced Header file
143 FD_form_tabbed_document * build_tabbed_document();
145 FD_form_doc_paper * build_doc_paper();
147 FD_form_doc_class * build_doc_class();
149 FD_form_doc_language * build_doc_language();
151 FD_form_doc_options * build_doc_options();
153 FD_form_doc_bullet * build_doc_bullet();
155 /// Real GUI implementation.
156 FD_form_tabbed_document * dialog_;
158 FD_form_doc_paper * paper_;
160 FD_form_doc_class * class_;
162 FD_form_doc_language * language_;
164 FD_form_doc_options * options_;
166 FD_form_doc_bullet * bullets_;
172 int current_bullet_panel;
174 int current_bullet_depth;
178 Combox * combo_language;
180 Combox * combo_doc_class;