]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormTabular.h
major GUII cleanup + Baruchs patch + Angus's patch + removed a couple of generated...
[features.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 "support/utility.hpp"
22
23 #ifdef SIGC_CXX_NAMESPACES
24 using SigC::Connection;
25 #endif
26
27 class LyXView;
28 class Dialogs;
29 class InsetTabular;
30 struct FD_form_tabular;
31 struct FD_form_tabular_options;
32 struct FD_form_column_options;
33 struct FD_form_cell_options;
34 struct FD_form_longtable_options;
35 struct FD_form_create_tabular;
36
37 /** This class provides an XForms implementation of the FormTabular Dialog.
38     The tabular dialog allows users to set/save their tabular.
39  */
40 class FormTabular : public DialogBase, public noncopyable {
41 public:
42     /**@name Constructors and Destructors */
43     //@{
44     /// #FormTabular x(LyXFunc ..., Dialogs ...);#
45     FormTabular(LyXView *, Dialogs *);
46     ///
47     ~FormTabular();
48     //@}
49
50     /**@name Real per-instance Callback Methods */
51     //@{
52     static  int WMHideCB(FL_FORM *, void *);
53     static void CloseCB(FL_OBJECT *, long);
54     static void OKCB(FL_OBJECT *, long);
55     static void CancelCB(FL_OBJECT *, long);
56     static void ApplyCB(FL_OBJECT *, long);
57     static void InputCB(FL_OBJECT *, long);
58     //@}
59
60 private:
61     /**@name Slot Methods */
62     //@{
63     /// Create the dialog if necessary, update it and display it.
64     void show();
65     void show_create();
66     void showInset(InsetTabular *);
67     /// Hide the dialog.
68     void hide();
69     void hide_create();
70     void hideInset(InsetTabular *);
71     /// Update the dialog.
72     void update();
73     void updateInset(InsetTabular *);
74     bool local_update(bool);
75     //@}
76     
77     /**@name Dialog internal methods */
78     //@{
79     /// Apply from dialog
80     void apply_create();
81     /// Build the dialog
82     void build();
83     ///
84     void SetTabularOptions(FL_OBJECT *, long);
85     ///
86     FD_form_tabular * build_tabular();
87     ///
88     FD_form_tabular_options * build_tabular_options();
89     ///
90     FD_form_column_options * build_column_options();
91     ///
92     FD_form_cell_options * build_cell_options();
93     ///
94     FD_form_longtable_options * build_longtable_options();
95     ///
96     FD_form_create_tabular * build_create_tabular();
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     ///
117     Dialogs * d_;
118     /// Update connection.
119     Connection u_;
120     /// Hide connection.
121     Connection h_;
122     ///
123     InsetTabular * inset_;
124     ///
125     int actCell_;
126     //@}
127 };
128
129 #endif