]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormTabular.h
e5def09932ee156afca67f9a0c7f01b87d19c072
[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();
77     void apply_create();
78     /// Filter the inputs
79     void input();
80     /// Build the dialog
81     void build();
82     ///
83     FD_form_tabular * build_tabular();
84     ///
85     FD_form_tabular_options * build_tabular_options();
86     ///
87     FD_form_column_options * build_column_options();
88     ///
89     FD_form_cell_options * build_cell_options();
90     ///
91     FD_form_longtable_options * build_longtable_options();
92     ///
93     FD_form_create_tabular * build_create_tabular();
94     ///
95     /// Explicitly free the dialog.
96     void free();
97     //@}
98
99     /**@name Private Data */
100     //@{
101     /// Real GUI implementation.
102     FD_form_tabular * dialog_;
103     ///
104     FD_form_tabular_options * tabular_options_;
105     ///
106     FD_form_column_options * column_options_;
107     ///
108     FD_form_cell_options * cell_options_;
109     ///
110     FD_form_longtable_options * longtable_options_;
111     ///
112     FD_form_create_tabular * create_tabular_;
113     ///
114     /// Which LyXView do we belong to?
115     LyXView * lv_;
116     Dialogs * d_;
117     /// Update connection.
118     Connection u_;
119     /// Hide connection.
120     Connection h_;
121     //@}
122     InsetTabular * inset_;
123     int actCell_;
124     bool confirmed_;
125 };
126
127 #endif