4 * Copyright 1995 Matthias Ettrich
5 * Copyright 1995-2001 the LyX Team
6 * Read the file COPYING
8 * \author Jürgen Vigna, jug@sad.it
14 #include <boost/scoped_ptr.hpp>
20 #include "FormInset.h"
24 struct FD_tabular_options;
25 struct FD_tabular_column;
26 struct FD_tabular_cell;
27 struct FD_tabular_longtable;
29 /** This class provides an XForms implementation of the FormTabular Dialog.
30 The tabular dialog allows users to set/save their tabular.
32 class FormTabular : public FormInset {
34 friend void gui_ShowTabular(InsetTabular *, LyXView &, Dialogs &);
35 friend void gui_UpdateTabular(InsetTabular *, LyXView &, Dialogs &);
37 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
38 FormTabular(LyXView &, Dialogs &);
41 /// Pointer to the actual instantiation of the ButtonController.
42 virtual xformsBC & bc();
43 /** Redraw the form (on receipt of a Signal indicating, for example,
44 that the xforms colours have been re-mapped). */
45 virtual void redraw();
46 /// Disconnect signals. Also perform any necessary housekeeping.
47 virtual void disconnect();
49 /// Slot launching dialog to an existing inset
50 void showInset(InsetTabular *);
51 /// Slot launching dialog to an existing inset
52 void updateInset(InsetTabular *);
53 /// Update dialog before showing it
54 virtual void update();
58 virtual bool input(FL_OBJECT *, long);
59 /// Pointer to the actual instantiation of the xforms form
60 virtual FL_FORM * form() const;
62 virtual int checkLongtableOptions(FL_OBJECT *, string &);
64 /// Real GUI implementation.
65 boost::scoped_ptr<FD_tabular> dialog_;
67 boost::scoped_ptr<FD_tabular_options> tabular_options_;
69 boost::scoped_ptr<FD_tabular_column> column_options_;
71 boost::scoped_ptr<FD_tabular_cell> cell_options_;
73 boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
75 /// pointer to the inset passed through showInset
76 InsetTabular * inset_;
79 /// The ButtonController
80 ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
81 /// if we are applying stuff during a close of the dialog
87 xformsBC & FormTabular::bc()