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 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
35 FormTabular(LyXView *, Dialogs *);
38 /// Pointer to the actual instantiation of the ButtonController.
39 virtual xformsBC & bc();
40 /** Redraw the form (on receipt of a Signal indicating, for example,
41 that the xforms colours have been re-mapped). */
42 virtual void redraw();
43 /// Disconnect signals. Also perform any necessary housekeeping.
44 virtual void disconnect();
46 /// Slot launching dialog to an existing inset
47 void showInset(InsetTabular *);
48 /// Slot launching dialog to an existing inset
49 void updateInset(InsetTabular *);
50 /// Update dialog before showing it
51 virtual void update();
55 virtual bool input(FL_OBJECT *, long);
56 /// Pointer to the actual instantiation of the xforms form
57 virtual FL_FORM * form() const;
59 virtual int checkLongtableOptions(FL_OBJECT *, string &);
61 /// Real GUI implementation.
62 boost::scoped_ptr<FD_tabular> dialog_;
64 boost::scoped_ptr<FD_tabular_options> tabular_options_;
66 boost::scoped_ptr<FD_tabular_column> column_options_;
68 boost::scoped_ptr<FD_tabular_cell> cell_options_;
70 boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
72 /// pointer to the inset passed through showInset
73 InsetTabular * inset_;
76 /// The ButtonController
77 ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
78 /// if we are applying stuff during a close of the dialog
84 xformsBC & FormTabular::bc()