]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormDocument.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormDocument.h
index 4d9330591d9a2408faa8eba9dbc5fb0092dffdd4..41d5686e2435145f1aa2b37181e4582279c14d2c 100644 (file)
@@ -1,26 +1,26 @@
 // -*- C++ -*-
 /**
  * \file FormDocument.h
- * Copyright 2000-2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Vigna, jug@sad.it
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef FORM_DOCUMENT_H
 #define FORM_DOCUMENT_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
-#include "FormBaseDeprecated.h"
+#include "FormBase.h"
 
 #include <boost/scoped_ptr.hpp>
 
 #include <vector>
 
-class Combox;
+class ControlDocument;
+
 class BufferParams;
 
 struct FD_document;
@@ -31,35 +31,24 @@ struct FD_document_options;
 struct FD_document_bullet;
 
 /** This class provides an XForms implementation of the FormDocument dialog.
   The table-layout-form here changes values for latex-tabulars
*  The table-layout-form here changes values for latex-tabulars
  */
-class FormDocument : public FormBaseBD {
+class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
 public:
-       FormDocument(LyXView &, Dialogs &);
-       ///
-       static void ComboInputCB(int, void *, Combox *);
+       FormDocument();
 private:
-       /// Pointer to the actual instantiation of the ButtonController.
-       virtual xformsBC & bc();
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
        virtual void redraw();
        /// Build the dialog
        virtual void build();
        /// Filter the inputs
-       virtual bool input( FL_OBJECT *, long);
+       virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
        /// Update the dialog.
        virtual void update();
        /// Apply from dialog
        virtual void apply();
-       /// Cancel from dialog
-       virtual void cancel();
 
-       ///
-       virtual FL_FORM * form() const;
-
-       ///
-       bool CheckDocumentInput(FL_OBJECT * ob, long);
        ///
        void ChoiceBulletSize(FL_OBJECT * ob, long);
        ///
@@ -73,7 +62,7 @@ private:
        ///
        void checkReadOnly();
        ///
-       void CheckChoiceClass(FL_OBJECT * ob, long);
+       void CheckChoiceClass();
        ///
        void UpdateLayoutDocument(BufferParams const & params);
        ///
@@ -101,20 +90,7 @@ private:
        ///
        void bullets_apply(BufferParams &);
 
-       ///
-       void paper_apply();
-       ///
-       bool class_apply();
-       ///
-       bool language_apply();
-       ///
-       bool options_apply();
-       ///
-       void bullets_apply();
-
        /// Real GUI implementation.
-       boost::scoped_ptr<FD_document> dialog_;
-       ///
        boost::scoped_ptr<FD_document_paper>    paper_;
        ///
        boost::scoped_ptr<FD_document_class>    class_;
@@ -135,20 +111,7 @@ private:
        ///
        FL_OBJECT * fbullet;
        ///
-       boost::scoped_ptr<Combox> combo_language;
-       ///
-       boost::scoped_ptr<Combox> combo_doc_class;
-       /// The ButtonController
-       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
-       ///
        std::vector<string> lang_;
 };
 
-
-inline
-xformsBC & FormDocument::bc()
-{
-       return bc_;
-}
-
 #endif