]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormTabular.h
xforms clean-up, described in detail in my mail of 31 May. See
[features.git] / src / frontends / xforms / FormTabular.h
1 // -*- C++ -*-
2 /**
3  * \file FormTabular.h
4  * Copyright 1995 Matthias Ettrich
5  * Copyright 1995-2001 the LyX Team
6  * Read the file COPYING
7  *
8  * \author Jürgen Vigna, jug@sad.it
9  */
10
11 #ifndef FORMTABULAR_H
12 #define FORMTABULAR_H
13
14 #include <boost/scoped_ptr.hpp>
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include "FormInset.h"
21
22 class InsetTabular;
23 struct FD_tabular;
24 struct FD_tabular_options;
25 struct FD_tabular_column;
26 struct FD_tabular_cell;
27 struct FD_tabular_longtable;
28
29 /** This class provides an XForms implementation of the FormTabular Dialog.
30     The tabular dialog allows users to set/save their tabular.
31  */
32 class FormTabular : public FormInset {
33 public:
34         /// #FormTabular x(LyXFunc ..., Dialogs ...);#
35         FormTabular(LyXView *, Dialogs *);
36
37 private:
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();
45
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();
52         /// Build the dialog
53         virtual void build();
54         /// Filter the inputs
55         virtual bool input(FL_OBJECT *, long);
56         /// Pointer to the actual instantiation of the xforms form
57         virtual FL_FORM * form() const;
58         ///
59         virtual int checkLongtableOptions(FL_OBJECT *, string &);
60
61         /// Real GUI implementation.
62         boost::scoped_ptr<FD_tabular> dialog_;
63         ///
64         boost::scoped_ptr<FD_tabular_options> tabular_options_;
65         ///
66         boost::scoped_ptr<FD_tabular_column> column_options_;
67         ///
68         boost::scoped_ptr<FD_tabular_cell> cell_options_;
69         ///
70         boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
71
72         /// pointer to the inset passed through showInset
73         InsetTabular * inset_;
74         ///
75         int actCell_;
76         /// The ButtonController
77         ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
78         /// if we are applying stuff during a close of the dialog
79         bool closing_;
80 };
81
82
83 inline
84 xformsBC & FormTabular::bc()
85 {
86         return bc_;
87 }
88 #endif