4 * Copyright 1995 Matthias Ettrich
5 * This file is part of LyX, the document processor.
6 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
16 #include <boost/scoped_ptr.hpp>
22 #include "FormInset.h"
26 struct FD_tabular_options;
27 struct FD_tabular_column;
28 struct FD_tabular_cell;
29 struct FD_tabular_longtable;
31 /** This class provides an XForms implementation of the FormTabular Dialog.
32 The tabular dialog allows users to set/save their tabular.
34 class FormTabular : public FormInset {
36 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
37 FormTabular(LyXView &, Dialogs &);
39 /// Slot launching dialog to an existing inset
40 void showInset(InsetTabular *);
41 /// Slot launching dialog to an existing inset
42 void updateInset(InsetTabular *);
45 /// Pointer to the actual instantiation of the ButtonController.
46 virtual xformsBC & bc();
47 /** Redraw the form (on receipt of a Signal indicating, for example,
48 that the xforms colours have been re-mapped). */
49 virtual void redraw();
50 /// Disconnect signals. Also perform any necessary housekeeping.
51 virtual void disconnect();
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()