]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormTabular.h
small patch from Dekel, begin introducing the real boost framework, get rid of the...
[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 <boost/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     /// #FormTabular x(LyXFunc ..., Dialogs ...);#
43     FormTabular(LyXView *, Dialogs *);
44     ///
45     ~FormTabular();
46     ///
47     static  int WMHideCB(FL_FORM *, void *);
48     ///
49     static void CloseCB(FL_OBJECT *, long);
50     ///
51     static void OKCB(FL_OBJECT *, long);
52     ///
53     static void CancelCB(FL_OBJECT *, long);
54     ///
55     static void ApplyCB(FL_OBJECT *, long);
56     ///
57     static void InputCB(FL_OBJECT *, long);
58
59 private:
60     /// Create the dialog if necessary, update it and display it.
61     void show();
62     ///
63     void show_create();
64     ///
65     void showInset(InsetTabular *);
66     /// Hide the dialog.
67     void hide();
68     ///
69     void hide_create();
70     ///
71     void hideInset(InsetTabular *);
72     /// Update the dialog.
73     void update();
74     ///
75     void updateInset(InsetTabular *);
76     ///
77     bool local_update(bool);
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     /// Real GUI implementation.
99     FD_form_tabular * dialog_;
100     ///
101     FD_form_tabular_options * tabular_options_;
102     ///
103     FD_form_column_options * column_options_;
104     ///
105     FD_form_cell_options * cell_options_;
106     ///
107     FD_form_longtable_options * longtable_options_;
108     ///
109     FD_form_create_tabular * create_tabular_;
110
111     /// Which LyXView do we belong to?
112     LyXView * lv_;
113     ///
114     Dialogs * d_;
115     /// Update connection.
116     Connection u_;
117     /// Hide connection.
118     Connection h_;
119     ///
120     InsetTabular * inset_;
121     ///
122     int actCell_;
123 };
124
125 #endif