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 dialog.
34 The table-layout-form here changes values for latex-tabulars
35 @author Kalle Dalheimer
38 : public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
41 FormDocument(LyXView *, Dialogs *);
76 /// Pointer to the actual instantiation of the ButtonController.
80 // /// Filter the inputs
81 // virtual bool input( FL_OBJECT *, long );
82 /// Update the dialog.
83 virtual void update();
86 /// Cancel from dialog
87 virtual void cancel();
90 // virtual QDialog* form() const;
93 bool CheckDocumentInput(QWidget* ob, long);
95 void ChoiceBulletSize(QWidget* ob, long);
97 void InputBulletLaTeX(QWidget* ob, long);
99 void BulletDepth(QWidget* ob, State);
101 void BulletPanel(QWidget* ob, State);
103 void BulletBMTable(QWidget* ob, long);
105 void checkMarginValues();
107 void checkReadOnly();
109 void CheckChoiceClass(QWidget* ob, long);
111 void UpdateLayoutDocument(BufferParams const & params);
114 void paper_update(BufferParams const &);
116 void class_update(BufferParams const &);
118 void language_update(BufferParams const &);
120 void options_update(BufferParams const &);
122 void bullets_update(BufferParams const &);
129 bool language_apply();
131 bool options_apply();
133 void bullets_apply();
135 /// Fdesign generated methods
136 QDialog* build_tabbed_document();
138 QDialog* build_doc_paper();
140 QDialog* build_doc_class();
142 QDialog* build_doc_language();
144 QDialog* build_doc_options();
146 QDialog* build_doc_bullet();
148 /// Real GUI implementation.
149 boost::scoped_ptr<FormDocumentDialogImpl> dialog_;
155 int current_bullet_panel;
157 int current_bullet_depth;
159 // FL_OBJECT * fbullet;
161 // boost::scoped_ptr<Combox> combo_language;
163 // boost::scoped_ptr<Combox> combo_doc_class;
164 /// The ButtonController
165 ButtonController<NoRepeatedApplyReadOnlyPolicy, qt2BC> bc_;
170 qt2BC & FormDocument::bc()