2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 *======================================================*/
12 * FormTabular Interface Class
18 #include "DialogBase.h"
19 #include <boost/utility.hpp>
21 #ifdef SIGC_CXX_NAMESPACES
22 using SigC::Connection;
28 struct FD_form_tabular;
29 struct FD_form_tabular_options;
30 struct FD_form_column_options;
31 struct FD_form_cell_options;
32 struct FD_form_longtable_options;
33 struct FD_form_create_tabular;
35 /** This class provides an XForms implementation of the FormTabular Dialog.
36 The tabular dialog allows users to set/save their tabular.
38 class FormTabular : public DialogBase, public noncopyable {
40 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
41 FormTabular(LyXView *, Dialogs *);
45 static int WMHideCB(FL_FORM *, void *);
47 static void CloseCB(FL_OBJECT *, long);
49 static void OKCB(FL_OBJECT *, long);
51 static void CancelCB(FL_OBJECT *, long);
53 static void ApplyCB(FL_OBJECT *, long);
55 static void InputCB(FL_OBJECT *, long);
58 /// Create the dialog if necessary, update it and display it.
63 void showInset(InsetTabular *);
69 void hideInset(InsetTabular *);
70 /// Update the dialog.
71 void update(bool = false);
73 void updateInset(InsetTabular *);
75 bool local_update(bool);
82 void SetTabularOptions(FL_OBJECT *, long);
84 FD_form_tabular * build_tabular();
86 FD_form_tabular_options * build_tabular_options();
88 FD_form_column_options * build_column_options();
90 FD_form_cell_options * build_cell_options();
92 FD_form_longtable_options * build_longtable_options();
94 FD_form_create_tabular * build_create_tabular();
96 /// Real GUI implementation.
97 FD_form_tabular * dialog_;
99 FD_form_tabular_options * tabular_options_;
101 FD_form_column_options * column_options_;
103 FD_form_cell_options * cell_options_;
105 FD_form_longtable_options * longtable_options_;
107 FD_form_create_tabular * create_tabular_;
109 /// Which LyXView do we belong to?
113 /// Update connection.
118 InsetTabular * inset_;