2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 *======================================================*/
12 * FormTabular Interface Class
18 #include <boost/smart_ptr.hpp>
24 #include "FormInset.h"
28 struct FD_form_tabular;
29 struct FD_form_tabular_options;
30 struct FD_form_column_options;
31 struct FD_form_cell_options;
32 struct FD_form_longtable_options;
34 /** This class provides an XForms implementation of the FormTabular Dialog.
35 The tabular dialog allows users to set/save their tabular.
37 class FormTabular : public FormInset {
39 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
40 FormTabular(LyXView *, Dialogs *);
43 /// Pointer to the actual instantiation of the ButtonController.
44 virtual xformsBC & bc();
45 /** Redraw the form (on receipt of a Signal indicating, for example,
46 that the xforms colours have been re-mapped). */
47 virtual void redraw();
48 /// Disconnect signals. Also perform any necessary housekeeping.
49 virtual void disconnect();
51 /// Slot launching dialog to an existing inset
52 void showInset(InsetTabular *);
53 /// Slot launching dialog to an existing inset
54 void updateInset(InsetTabular *);
55 /// Update dialog before showing it
56 virtual void update();
60 virtual bool input(FL_OBJECT *, long);
61 /// Pointer to the actual instantiation of the xforms form
62 virtual FL_FORM * form() const;
64 /// Fdesign generated methods
65 FD_form_tabular * build_tabular();
67 FD_form_tabular_options * build_tabular_options();
69 FD_form_column_options * build_column_options();
71 FD_form_cell_options * build_cell_options();
73 FD_form_longtable_options * build_longtable_options();
75 /// Real GUI implementation.
76 boost::scoped_ptr<FD_form_tabular> dialog_;
78 boost::scoped_ptr<FD_form_tabular_options> tabular_options_;
80 boost::scoped_ptr<FD_form_column_options> column_options_;
82 boost::scoped_ptr<FD_form_cell_options> cell_options_;
84 boost::scoped_ptr<FD_form_longtable_options> longtable_options_;
86 /// pointer to the inset passed through showInset
87 InsetTabular * inset_;
90 /// The ButtonController
91 ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
96 xformsBC & FormTabular::bc()