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 * This file copyright 1999-2000
12 *======================================================*/
14 * FormTabular Interface Class
20 #include "DialogBase.h"
21 #include "support/utility.hpp"
23 #ifdef SIGC_CXX_NAMESPACES
24 using SigC::Connection;
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;
37 /** This class provides an XForms implementation of the FormTabular Dialog.
38 The tabular dialog allows users to set/save their tabular.
40 class FormTabular : public DialogBase, public noncopyable {
42 /**@name Constructors and Destructors */
44 /// #FormTabular x(LyXFunc ..., Dialogs ...);#
45 FormTabular(LyXView *, Dialogs *);
50 /**@name Real per-instance Callback Methods */
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);
61 /**@name Slot Methods */
63 /// Create the dialog if necessary, update it and display it.
66 void showInset(InsetTabular *);
70 void hideInset(InsetTabular *);
71 /// Update the dialog.
73 void updateInset(InsetTabular *);
74 bool local_update(bool);
77 /**@name Dialog internal methods */
84 void SetTabularOptions(FL_OBJECT *, long);
86 FD_form_tabular * build_tabular();
88 FD_form_tabular_options * build_tabular_options();
90 FD_form_column_options * build_column_options();
92 FD_form_cell_options * build_cell_options();
94 FD_form_longtable_options * build_longtable_options();
96 FD_form_create_tabular * build_create_tabular();
99 /**@name Private Data */
101 /// Real GUI implementation.
102 FD_form_tabular * dialog_;
104 FD_form_tabular_options * tabular_options_;
106 FD_form_column_options * column_options_;
108 FD_form_cell_options * cell_options_;
110 FD_form_longtable_options * longtable_options_;
112 FD_form_create_tabular * create_tabular_;
114 /// Which LyXView do we belong to?
118 /// Update connection.
123 InsetTabular * inset_;