]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabular.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormTabular.h
index c6c49efae030da6b01e0029049bfc7b550fc4df9..6ae27a26c1db8979fa4f3fb213b37e2f01ae741d 100644 (file)
@@ -2,98 +2,68 @@
 /**
  * \file FormTabular.h
  * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 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 FORMTABULAR_H
 #define FORMTABULAR_H
 
-#include <boost/smart_ptr.hpp>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "FormInset.h"
+#include "FormDialogView.h"
+#include <boost/scoped_ptr.hpp>
 
 class InsetTabular;
-struct FD_form_tabular;
-struct FD_form_tabular_options;
-struct FD_form_column_options;
-struct FD_form_cell_options;
-struct FD_form_longtable_options;
+class ControlTabular;
+struct FD_tabular;
+struct FD_tabular_options;
+struct FD_tabular_column;
+struct FD_tabular_cell;
+struct FD_tabular_longtable;
 
 /** This class provides an XForms implementation of the FormTabular Dialog.
     The tabular dialog allows users to set/save their tabular.
  */
-class FormTabular : public FormInset {
+class FormTabular
+       : public FormController<ControlTabular, FormView<FD_tabular> > {
 public:
-       /// #FormTabular x(LyXFunc ..., Dialogs ...);#
-       FormTabular(LyXView *, Dialogs *);
+
+       FormTabular(Dialog &);
 
 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();
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
 
-       /// Slot launching dialog to an existing inset
-       void showInset(InsetTabular *);
-       /// Slot launching dialog to an existing inset
-       void updateInset(InsetTabular *);
+       /// not used
+       virtual void apply() {}
        /// Update dialog before showing it
        virtual void update();
        /// Build the dialog
        virtual void build();
        /// Filter the inputs
-       virtual bool input(FL_OBJECT *, long);
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const;
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
        ///
        virtual int checkLongtableOptions(FL_OBJECT *, string &);
 
-       /// Fdesign generated methods
-       FD_form_tabular * build_tabular();
        ///
-       FD_form_tabular_options * build_tabular_options();
+       boost::scoped_ptr<FD_tabular_options> tabular_options_;
        ///
-       FD_form_column_options * build_column_options();
+       boost::scoped_ptr<FD_tabular_column> column_options_;
        ///
-       FD_form_cell_options * build_cell_options();
+       boost::scoped_ptr<FD_tabular_cell> cell_options_;
        ///
-       FD_form_longtable_options * build_longtable_options();
+       boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
 
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_form_tabular> dialog_;
-       ///
-       boost::scoped_ptr<FD_form_tabular_options> tabular_options_;
        ///
-       boost::scoped_ptr<FD_form_column_options> column_options_;
-       ///
-       boost::scoped_ptr<FD_form_cell_options> cell_options_;
-       ///
-       boost::scoped_ptr<FD_form_longtable_options> longtable_options_;
+       bool closing_;
 
-       /// pointer to the inset passed through showInset
-       InsetTabular * inset_;
        ///
        int actCell_;
-       /// The ButtonController
-       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
-       /// if we are applying stuff during a close of the dialog
-       bool closing_;
 };
 
-
-inline
-xformsBC & FormTabular::bc()
-{
-       return bc_;
-}
-#endif
+#endif // FORMTABULAR_H