]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormTabular.h
c2f69e66ed8ca28942541e167be9ca3586b364b0
[lyx.git] / src / frontends / xforms / FormTabular.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1995 Matthias Ettrich
8  *          Copyright 1995-2000 The LyX Team.
9  *
10  *          This file copyright 1999-2000
11  *          Allan Rae
12  *======================================================*/
13 /* FormTabular.h
14  * FormTabular Interface Class
15  */
16
17 #ifndef FORMTABULAR_H
18 #define FORMTABULAR_H
19
20 #include "DialogBase.h"
21 #include "form_tabular.h"
22 #ifdef SIGC_CXX_NAMESPACES
23 using SigC::Connection;
24 #endif
25
26 class LyXView;
27 class Dialogs;
28 class InsetTabular;
29
30 /** This class provides an XForms implementation of the FormTabular Dialog.
31     The tabular dialog allows users to set/save their tabular.
32  */
33 class FormTabular : public DialogBase {
34 public:
35     /**@name Constructors and Destructors */
36     //@{
37     /// #FormTabular x(LyXFunc ..., Dialogs ...);#
38     FormTabular(LyXView *, Dialogs *);
39     ///
40     ~FormTabular();
41     //@}
42
43     /**@name Real per-instance Callback Methods */
44     //@{
45     static  int WMHideCB(FL_FORM *, void *);
46     static void CloseCB(FL_OBJECT *, long);
47     static void OKCB(FL_OBJECT *, long);
48     static void CancelCB(FL_OBJECT *, long);
49     static void ApplyCB(FL_OBJECT *, long);
50     static void InputCB(FL_OBJECT *, long);
51     //@}
52
53 private:
54     FormTabular() {}
55     FormTabular(FormTabular &) : DialogBase() {}
56     
57     /**@name Slot Methods */
58     //@{
59     /// Create the dialog if necessary, update it and display it.
60     void show();
61     void show_create();
62     void showInset(InsetTabular *);
63     /// Hide the dialog.
64     void hide();
65     void hide_create();
66     void hideInset(InsetTabular *);
67     /// Update the dialog.
68     void update();
69     void updateInset(InsetTabular *);
70     bool local_update(bool);
71     //@}
72     
73     /**@name Dialog internal methods */
74     //@{
75     /// Apply from dialog
76     void apply_create();
77     /// Build the dialog
78     void build();
79     ///
80     void SetTabularOptions(FL_OBJECT *, long);
81     ///
82     FD_form_tabular * build_tabular();
83     ///
84     FD_form_tabular_options * build_tabular_options();
85     ///
86     FD_form_column_options * build_column_options();
87     ///
88     FD_form_cell_options * build_cell_options();
89     ///
90     FD_form_longtable_options * build_longtable_options();
91     ///
92     FD_form_create_tabular * build_create_tabular();
93     ///
94     /// Explicitly free the dialog.
95     void free();
96     //@}
97
98     /**@name Private Data */
99     //@{
100     /// Real GUI implementation.
101     FD_form_tabular * dialog_;
102     ///
103     FD_form_tabular_options * tabular_options_;
104     ///
105     FD_form_column_options * column_options_;
106     ///
107     FD_form_cell_options * cell_options_;
108     ///
109     FD_form_longtable_options * longtable_options_;
110     ///
111     FD_form_create_tabular * create_tabular_;
112     ///
113     /// Which LyXView do we belong to?
114     LyXView * lv_;
115     Dialogs * d_;
116     /// Update connection.
117     Connection u_;
118     /// Hide connection.
119     Connection h_;
120     //@}
121     InsetTabular * inset_;
122     int actCell_;
123 };
124
125 #endif