]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormTabular.h
change some __GNUG_ to __GNUG__
[lyx.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/smart_ptr.hpp>
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include "FormInset.h"
21
22 class InsetTabular;
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;
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         /// Fdesign generated methods
62         FD_form_tabular * build_tabular();
63         ///
64         FD_form_tabular_options * build_tabular_options();
65         ///
66         FD_form_column_options * build_column_options();
67         ///
68         FD_form_cell_options * build_cell_options();
69         ///
70         FD_form_longtable_options * build_longtable_options();
71
72         /// Real GUI implementation.
73         boost::scoped_ptr<FD_form_tabular> dialog_;
74         ///
75         boost::scoped_ptr<FD_form_tabular_options> tabular_options_;
76         ///
77         boost::scoped_ptr<FD_form_column_options> column_options_;
78         ///
79         boost::scoped_ptr<FD_form_cell_options> cell_options_;
80         ///
81         boost::scoped_ptr<FD_form_longtable_options> longtable_options_;
82
83         /// pointer to the inset passed through showInset
84         InsetTabular * inset_;
85         ///
86         int actCell_;
87         /// The ButtonController
88         ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
89         /// if we are applying stuff during a close of the dialog
90         bool closing_;
91 };
92
93
94 inline
95 xformsBC & FormTabular::bc()
96 {
97         return bc_;
98 }
99 #endif