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 <boost/utility.hpp>
26 class NoRepeatedApplyReadOnlyPolicy;
27 //template <class x> class ButtonController;
28 class ButtonController;
30 struct FD_form_tabbed_paragraph;
31 struct FD_form_paragraph_general;
32 struct FD_form_paragraph_extra;
34 #ifdef SIGC_CXX_NAMESPACES
35 using SigC::Connection;
38 /** This class provides an XForms implementation of the FormParagraph Popup.
39 The table-layout-form here changes values for latex-tabulars
41 class FormParagraph : public DialogBase, public noncopyable {
43 FormParagraph(LyXView *, Dialogs *);
46 static int WMHideCB(FL_FORM *, void *);
47 static void OKCB(FL_OBJECT *, long);
48 static void ApplyCB(FL_OBJECT *, long);
49 static void CancelCB(FL_OBJECT *, long);
50 static void RestoreCB(FL_OBJECT *, long);
51 static void InputCB(FL_OBJECT *, long);
52 static void VSpaceCB(FL_OBJECT *, long);
54 enum EnumPopupStatus {
64 /// Create the popup if necessary, update it and display it.
71 void general_update();
84 /// Explicitly free the popup.
87 bool CheckParagraphInput(FL_OBJECT * ob, long);
90 /// Typedefinitions from the fdesign produced Header file
91 FD_form_tabbed_paragraph * build_tabbed_paragraph();
93 FD_form_paragraph_general * build_paragraph_general();
95 FD_form_paragraph_extra * build_paragraph_extra();
97 /// Real GUI implementation.
98 FD_form_tabbed_paragraph * dialog_;
100 FD_form_paragraph_general * general_;
102 FD_form_paragraph_extra * extra_;
103 /// Which LyXView do we belong to?
107 /// Update connection.
111 /// has form contents changed? Used to control OK/Apply
112 EnumPopupStatus status;
114 ButtonController/*<NoRepeatedApplyReadOnlyPolicy>*/ * bc_;