]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabular.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormTabular.h
index b52cf5ffad62b196cae8b1ea9d5b6102366c87b3..1d7bbe249b7edd7d6d4d433bb3f5da77bf762e08 100644 (file)
@@ -1,26 +1,26 @@
 // -*- C++ -*-
 /**
  * \file FormTabular.h
- * Copyright 1995 Matthias Ettrich
- * 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
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef FORMTABULAR_H
 #define FORMTABULAR_H
 
+#include "FormDialogView.h"
 #include <boost/scoped_ptr.hpp>
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+class InsetTabular;
 
-#include "FormInset.h"
+namespace lyx {
+namespace frontend {
 
-class InsetTabular;
+class ControlTabular;
 struct FD_tabular;
 struct FD_tabular_options;
 struct FD_tabular_column;
@@ -30,38 +30,29 @@ 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 &);
 
-       /// Slot launching dialog to an existing inset
-       void showInset(InsetTabular *);
-       /// Slot launching dialog to an existing inset
-       void updateInset(InsetTabular *);
+       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();
 
+       /// 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 &);
+       virtual int checkLongtableOptions(FL_OBJECT *, std::string &);
 
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_tabular> dialog_;
        ///
        boost::scoped_ptr<FD_tabular_options> tabular_options_;
        ///
@@ -71,20 +62,14 @@ private:
        ///
        boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
 
-       /// 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_;
+
+       ///
+       int actCell_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
-inline
-xformsBC & FormTabular::bc()
-{
-       return bc_;
-}
-#endif
+#endif // FORMTABULAR_H