X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormTabular.h;h=08002a16b1df8b86460f3a981471f8ff4af7bdc0;hb=2c3af1475e2a408f725b5eea93583ee13e3d09cc;hp=f21aba995c00e4f22d20663535c9e8cc9e6cfb0b;hpb=ba01a232eaea8162ca7980b552f21ab3b7689744;p=lyx.git diff --git a/src/frontends/xforms/FormTabular.h b/src/frontends/xforms/FormTabular.h index f21aba995c..08002a16b1 100644 --- a/src/frontends/xforms/FormTabular.h +++ b/src/frontends/xforms/FormTabular.h @@ -5,7 +5,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * *======================================================*/ /* FormTabular.h @@ -15,109 +15,89 @@ #ifndef FORMTABULAR_H #define FORMTABULAR_H -#include "DialogBase.h" -#include +#include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; +#ifdef __GNUG__ +#pragma interface #endif -class LyXView; -class Dialogs; +#include "FormInset.h" + 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; /** 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 FormInset { 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 x(LyXFunc ..., Dialogs ...);# + FormTabular(LyXView *, Dialogs *); 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(bool = false); - /// - 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(); + /// 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 *); + /// 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 int checkLongtableOptions(FL_OBJECT *, string &); - /// 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_; + /// Fdesign generated methods + 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(); - /// Which LyXView do we belong to? - LyXView * lv_; - /// - Dialogs * d_; - /// Update connection. - Connection u_; - /// Hide connection. - Connection h_; - /// - InsetTabular * inset_; - /// - int actCell_; + /// Real GUI implementation. + boost::scoped_ptr dialog_; + /// + boost::scoped_ptr tabular_options_; + /// + boost::scoped_ptr column_options_; + /// + boost::scoped_ptr cell_options_; + /// + boost::scoped_ptr longtable_options_; + + /// pointer to the inset passed through showInset + InsetTabular * inset_; + /// + int actCell_; + /// The ButtonController + ButtonController bc_; + /// if we are applying stuff during a close of the dialog + bool closing_; }; + +inline +xformsBC & FormTabular::bc() +{ + return bc_; +} #endif