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/smart_ptr.hpp>
20 #include "FormInset.h"
23 struct FD_form_tabular;
24 struct FD_form_tabular_options;
25 struct FD_form_column_options;
26 struct FD_form_cell_options;
27 struct FD_form_longtable_options;
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 /// Fdesign generated methods
62 FD_form_tabular * build_tabular();
64 FD_form_tabular_options * build_tabular_options();
66 FD_form_column_options * build_column_options();
68 FD_form_cell_options * build_cell_options();
70 FD_form_longtable_options * build_longtable_options();
72 /// Real GUI implementation.
73 boost::scoped_ptr<FD_form_tabular> dialog_;
75 boost::scoped_ptr<FD_form_tabular_options> tabular_options_;
77 boost::scoped_ptr<FD_form_column_options> column_options_;
79 boost::scoped_ptr<FD_form_cell_options> cell_options_;
81 boost::scoped_ptr<FD_form_longtable_options> longtable_options_;
83 /// pointer to the inset passed through showInset
84 InsetTabular * inset_;
87 /// The ButtonController
88 ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
89 /// if we are applying stuff during a close of the dialog
95 xformsBC & FormTabular::bc()