]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormTabular.h
fix tooltips in toolbar
[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/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         friend void gui_ShowTabular(InsetTabular *, LyXView &, Dialogs &);
35         friend void gui_UpdateTabular(InsetTabular *, LyXView &, Dialogs &);
36
37         /// #FormTabular x(LyXFunc ..., Dialogs ...);#
38         FormTabular(LyXView &, Dialogs &);
39
40 private:
41         /// Pointer to the actual instantiation of the ButtonController.
42         virtual xformsBC & bc();
43         /** Redraw the form (on receipt of a Signal indicating, for example,
44             that the xforms colours have been re-mapped). */
45         virtual void redraw();
46         /// Disconnect signals. Also perform any necessary housekeeping.
47         virtual void disconnect();
48
49         /// Slot launching dialog to an existing inset
50         void showInset(InsetTabular *);
51         /// Slot launching dialog to an existing inset
52         void updateInset(InsetTabular *);
53         /// Update dialog before showing it
54         virtual void update();
55         /// Build the dialog
56         virtual void build();
57         /// Filter the inputs
58         virtual bool input(FL_OBJECT *, long);
59         /// Pointer to the actual instantiation of the xforms form
60         virtual FL_FORM * form() const;
61         ///
62         virtual int checkLongtableOptions(FL_OBJECT *, string &);
63
64         /// Real GUI implementation.
65         boost::scoped_ptr<FD_tabular> dialog_;
66         ///
67         boost::scoped_ptr<FD_tabular_options> tabular_options_;
68         ///
69         boost::scoped_ptr<FD_tabular_column> column_options_;
70         ///
71         boost::scoped_ptr<FD_tabular_cell> cell_options_;
72         ///
73         boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
74
75         /// pointer to the inset passed through showInset
76         InsetTabular * inset_;
77         ///
78         int actCell_;
79         /// The ButtonController
80         ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
81         /// if we are applying stuff during a close of the dialog
82         bool closing_;
83 };
84
85
86 inline
87 xformsBC & FormTabular::bc()
88 {
89         return bc_;
90 }
91 #endif