X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormTabular.h;h=ae5b498a3c4659edaa6e6e9de3e7c2ffcc01a7da;hb=eba67bc3120dc301bf193c3f3b570f51f00a4654;hp=63b9e9eb64f9186d737b84c04da126767dd58f4d;hpb=f1974cd18a305dc091c081a1729a0fd6e45611f8;p=lyx.git diff --git a/src/frontends/xforms/FormTabular.h b/src/frontends/xforms/FormTabular.h index 63b9e9eb64..ae5b498a3c 100644 --- a/src/frontends/xforms/FormTabular.h +++ b/src/frontends/xforms/FormTabular.h @@ -7,8 +7,6 @@ * Copyright 1995 Matthias Ettrich * Copyright 1995-2000 The LyX Team. * - * This file copyright 1999-2000 - * Allan Rae *======================================================*/ /* FormTabular.h * FormTabular Interface Class @@ -17,111 +15,71 @@ #ifndef FORMTABULAR_H #define FORMTABULAR_H -#include "DialogBase.h" -#include "form_tabular.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif +#include "FormInset.h" -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; /** This class provides an XForms implementation of the FormTabular Dialog. The tabular dialog allows users to set/save their tabular. */ -class FormTabular : public DialogBase { +class FormTabular : public FormInset { public: - /**@name Constructors and Destructors */ - //@{ - /// #FormTabular x(LyXFunc ..., Dialogs ...);# - FormTabular(LyXView *, Dialogs *); - /// - ~FormTabular(); - //@} - - /**@name Real per-instance Callback Methods */ - //@{ - static int WMHideCB(FL_FORM *, void *); - static void TabularCloseCB(FL_OBJECT *, long); - static void TabularOKCB(FL_OBJECT *, long); - static void TabularCancelCB(FL_OBJECT *, long); - static void TabularApplyCB(FL_OBJECT *, long); - static void TabularInputCB(FL_OBJECT *, long); - //@} + /// #FormTabular x(LyXFunc ..., Dialogs ...);# + FormTabular(LyXView *, Dialogs *); + /// + ~FormTabular(); private: - FormTabular() {} - FormTabular(FormTabular &) : DialogBase() {} - - /**@name Slot Methods */ - //@{ - /// 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); - //@} - - /**@name Dialog internal methods */ - //@{ - /// Apply from dialog - void apply(); - void apply_create(); - /// Filter the inputs - void input(); - /// Build the dialog - void build(); - /// - 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(); - /// - /// Explicitly free the dialog. - void free(); - //@} + /** Redraw the form (on receipt of a Signal indicating, for example, + that the xform 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 xform's form + virtual FL_FORM * form() const; + + /// 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(); + + /// 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_; - /**@name Private Data */ - //@{ - /// 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_; - /// - /// Which LyXView do we belong to? - LyXView * lv_; - Dialogs * d_; - /// Update connection. - Connection u_; - /// Hide connection. - Connection h_; - //@} - InsetTabular * inset_; - int actCell_; - bool confirmed_; + /// pointer to the inset passed through showInset + InsetTabular * inset_; + /// + int actCell_; }; #endif