2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 2000 The LyX Team.
9 * @author Kalle Dalheimer
11 *======================================================*/
13 #ifndef FORM_DOCUMENT_H
14 #define FORM_DOCUMENT_H
17 #include <boost/smart_ptr.hpp>
27 class ControlDocument;
28 class FormDocumentDialogImpl;
33 /** This class provides an Qt2 implementation of the FormDocument Popup.
34 The table-layout-form here changes values for latex-tabulars
35 @author Kalle Dalheimer
38 : public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
41 /// #FormDocument x(Communicator ..., Popups ...);#
42 FormDocument(LyXView *, Dialogs *);
77 /// Pointer to the actual instantiation of the ButtonController.
81 // /// Filter the inputs
82 // virtual bool input( FL_OBJECT *, long );
84 virtual void update();
88 virtual void cancel();
91 // virtual QDialog* form() const;
94 bool CheckDocumentInput(QWidget* ob, long);
96 void ChoiceBulletSize(QWidget* ob, long);
98 void InputBulletLaTeX(QWidget* ob, long);
100 void BulletDepth(QWidget* ob, State);
102 void BulletPanel(QWidget* ob, State);
104 void BulletBMTable(QWidget* ob, long);
106 void checkMarginValues();
108 void checkReadOnly();
110 void CheckChoiceClass(QWidget* ob, long);
112 void UpdateLayoutDocument(BufferParams const & params);
115 void paper_update(BufferParams const &);
117 void class_update(BufferParams const &);
119 void language_update(BufferParams const &);
121 void options_update(BufferParams const &);
123 void bullets_update(BufferParams const &);
130 bool language_apply();
132 bool options_apply();
134 void bullets_apply();
136 /// Fdesign generated methods
137 QDialog* build_tabbed_document();
139 QDialog* build_doc_paper();
141 QDialog* build_doc_class();
143 QDialog* build_doc_language();
145 QDialog* build_doc_options();
147 QDialog* build_doc_bullet();
149 /// Real GUI implementation.
150 boost::scoped_ptr<FormDocumentDialogImpl> dialog_;
156 int current_bullet_panel;
158 int current_bullet_depth;
160 // FL_OBJECT * fbullet;
162 // boost::scoped_ptr<Combox> combo_language;
164 // boost::scoped_ptr<Combox> combo_doc_class;
165 /// The ButtonController
166 ButtonController<NoRepeatedApplyReadOnlyPolicy, qt2BC> bc_;
171 qt2BC & FormDocument::bc()