]> 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 aa95b0fae1afba36c1d37c4d04fcd0590a78daaf..6ae27a26c1db8979fa4f3fb213b37e2f01ae741d 100644 (file)
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-2000 The LyX Team.
+/**
+ * \file FormTabular.h
+ * Copyright 1995 Matthias Ettrich
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *         This file copyright 1999-2000
- *         Allan Rae
- *======================================================*/
-/* FormTabular.h
- * FormTabular Interface Class
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef FORMTABULAR_H
 #define FORMTABULAR_H
 
-#include "DialogBase.h"
-#include <boost/utility.hpp>
-
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
+#include "FormDialogView.h"
+#include <boost/scoped_ptr.hpp>
 
-class LyXView;
-class Dialogs;
 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;
-struct FD_form_create_tabular;
+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 DialogBase, public noncopyable {
+class FormTabular
+       : public FormController<ControlTabular, FormView<FD_tabular> > {
 public:
-    /// #FormTabular x(LyXFunc ..., Dialogs ...);#
-    FormTabular(LyXView *, Dialogs *);
-    ///
-    ~FormTabular();
-    ///
-    static  int WMHideCB(FL_FORM *, void *);
-    ///
-    static void CloseCB(FL_OBJECT *, long);
-    ///
-    static void OKCB(FL_OBJECT *, long);
-    ///
-    static void CancelCB(FL_OBJECT *, long);
-    ///
-    static void ApplyCB(FL_OBJECT *, long);
-    ///
-    static void InputCB(FL_OBJECT *, long);
+
+       FormTabular(Dialog &);
 
 private:
-    /// Create the dialog if necessary, update it and display it.
-    void show();
-    ///
-    void show_create();
-    ///
-    void showInset(InsetTabular *);
-    /// Hide the dialog.
-    void hide();
-    ///
-    void hide_create();
-    ///
-    void hideInset(InsetTabular *);
-    /// Update the dialog.
-    void update();
-    ///
-    void updateInset(InsetTabular *);
-    ///
-    bool local_update(bool);
-    
-    /// Apply from dialog
-    void apply_create();
-    /// Build the dialog
-    void build();
-    ///
-    void SetTabularOptions(FL_OBJECT *, long);
-    ///
-    FD_form_tabular * build_tabular();
-    ///
-    FD_form_tabular_options * build_tabular_options();
-    ///
-    FD_form_column_options * build_column_options();
-    ///
-    FD_form_cell_options * build_cell_options();
-    ///
-    FD_form_longtable_options * build_longtable_options();
-    ///
-    FD_form_create_tabular * build_create_tabular();
+       /** Redraw the form (on receipt of a Signal indicating, for example,
+           that the xforms colours have been re-mapped). */
+       virtual void redraw();
+
+       /// not used
+       virtual void apply() {}
+       /// Update dialog before showing it
+       virtual void update();
+       /// Build the dialog
+       virtual void build();
+       /// Filter the inputs
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       ///
+       virtual int checkLongtableOptions(FL_OBJECT *, string &);
+
+       ///
+       boost::scoped_ptr<FD_tabular_options> tabular_options_;
+       ///
+       boost::scoped_ptr<FD_tabular_column> column_options_;
+       ///
+       boost::scoped_ptr<FD_tabular_cell> cell_options_;
+       ///
+       boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
 
-    /// Real GUI implementation.
-    FD_form_tabular * dialog_;
-    ///
-    FD_form_tabular_options * tabular_options_;
-    ///
-    FD_form_column_options * column_options_;
-    ///
-    FD_form_cell_options * cell_options_;
-    ///
-    FD_form_longtable_options * longtable_options_;
-    ///
-    FD_form_create_tabular * create_tabular_;
+       ///
+       bool closing_;
 
-    /// Which LyXView do we belong to?
-    LyXView * lv_;
-    ///
-    Dialogs * d_;
-    /// Update connection.
-    Connection u_;
-    /// Hide connection.
-    Connection h_;
-    ///
-    InsetTabular * inset_;
-    ///
-    int actCell_;
+       ///
+       int actCell_;
 };
 
-#endif
+#endif // FORMTABULAR_H