2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 2000 The LyX Team.
11 *======================================================*/
13 #ifndef FORM_PARAGRAPH_H
14 #define FORM_PARAGRAPH_H
16 #include "DialogBase.h"
17 #include "support/utility.hpp"
26 class NoRepeatedApplyReadOnlyPolicy;
27 template <class x> class ButtonController;
29 struct FD_form_tabbed_paragraph;
30 struct FD_form_paragraph_general;
31 struct FD_form_paragraph_extra;
33 #ifdef SIGC_CXX_NAMESPACES
34 using SigC::Connection;
37 /** This class provides an XForms implementation of the FormParagraph Popup.
38 The table-layout-form here changes values for latex-tabulars
40 class FormParagraph : public DialogBase, public noncopyable {
42 FormParagraph(LyXView *, Dialogs *);
45 static int WMHideCB(FL_FORM *, void *);
46 static void OKCB(FL_OBJECT *, long);
47 static void ApplyCB(FL_OBJECT *, long);
48 static void CancelCB(FL_OBJECT *, long);
49 static void RestoreCB(FL_OBJECT *, long);
50 static void InputCB(FL_OBJECT *, long);
51 static void VSpaceCB(FL_OBJECT *, long);
53 enum EnumPopupStatus {
63 /// Create the popup if necessary, update it and display it.
70 void general_update();
83 /// Explicitly free the popup.
86 bool CheckParagraphInput(FL_OBJECT * ob, long);
89 /// Typedefinitions from the fdesign produced Header file
90 FD_form_tabbed_paragraph * build_tabbed_paragraph();
92 FD_form_paragraph_general * build_paragraph_general();
94 FD_form_paragraph_extra * build_paragraph_extra();
96 /// Real GUI implementation.
97 FD_form_tabbed_paragraph * dialog_;
99 FD_form_paragraph_general * general_;
101 FD_form_paragraph_extra * extra_;
102 /// Which LyXView do we belong to?
106 /// Update connection.
110 /// has form contents changed? Used to control OK/Apply
111 EnumPopupStatus status;
113 ButtonController<NoRepeatedApplyReadOnlyPolicy> * bc_;