X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormParagraph.h;h=c8458eb64a14d1db732945d41b0a82b742a473ba;hb=eba67bc3120dc301bf193c3f3b570f51f00a4654;hp=947cf094c97b0ad7eb4d61c34d2e1d0f95e123c6;hpb=e1cd54a1a23175d6ef84dd00609c96ed1470438c;p=lyx.git diff --git a/src/frontends/xforms/FormParagraph.h b/src/frontends/xforms/FormParagraph.h index 947cf094c9..c8458eb64a 100644 --- a/src/frontends/xforms/FormParagraph.h +++ b/src/frontends/xforms/FormParagraph.h @@ -13,104 +13,65 @@ #ifndef FORM_PARAGRAPH_H #define FORM_PARAGRAPH_H -#include "DialogBase.h" -#include "support/utility.hpp" -#include +#include "FormBase.h" #ifdef __GNUG_ #pragma interface #endif -class LyXView; -class Dialogs; -class NoRepeatedApplyReadOnlyPolicy; -template class ButtonController; struct FD_form_tabbed_paragraph; struct FD_form_paragraph_general; struct FD_form_paragraph_extra; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif - /** This class provides an XForms implementation of the FormParagraph Popup. - The table-layout-form here changes values for latex-tabulars + * @author Jürgen Vigna */ -class FormParagraph : public DialogBase, public noncopyable { +class FormParagraph : public FormBaseBD { public: - FormParagraph(LyXView *, Dialogs *); - ~FormParagraph(); - /// - static int WMHideCB(FL_FORM *, void *); - static void OKCB(FL_OBJECT *, long); - static void ApplyCB(FL_OBJECT *, long); - static void CancelCB(FL_OBJECT *, long); - static void RestoreCB(FL_OBJECT *, long); - static void InputCB(FL_OBJECT *, long); - static void VSpaceCB(FL_OBJECT *, long); - /// - enum EnumPopupStatus { - /// - POPUP_UNMODIFIED, /// - POPUP_MODIFIED, + FormParagraph(LyXView *, Dialogs *); /// - POPUP_READONLY - }; + ~FormParagraph(); private: - /// Create the popup if necessary, update it and display it. - void show(); - /// Hide the popup. - void hide(); - /// Update the popup. - void update(); - /// - void general_update(); - /// - void extra_update(); - /// Apply from popup - void apply(); - /// - void general_apply(); - /// - void extra_apply(); - /// Cancel from popup - void cancel(); - /// Build the popup - void build(); - /// Explicitly free the popup. - void free(); - /// - bool CheckParagraphInput(FL_OBJECT * ob, long); + /** Redraw the form (on receipt of a Signal indicating, for example, + that the xform colours have been re-mapped). */ + virtual void redraw(); + /// Build the popup + virtual void build(); + /// Apply from popup + virtual void apply(); + /// Update the popup. + virtual void update(); + /// Filter the inputs on callback from xforms + virtual bool input(FL_OBJECT * ob, long); + /// + virtual FL_FORM * form() const; + + /// + void general_update(); + /// + void extra_update(); + /// + void general_apply(); + /// + void extra_apply(); - /// Typedefinitions from the fdesign produced Header file - FD_form_tabbed_paragraph * build_tabbed_paragraph(); - /// - FD_form_paragraph_general * build_paragraph_general(); - /// - FD_form_paragraph_extra * build_paragraph_extra(); + /// Typedefinitions from the fdesign produced Header file + FD_form_tabbed_paragraph * build_tabbed_paragraph(); + /// + FD_form_paragraph_general * build_paragraph_general(); + /// + FD_form_paragraph_extra * build_paragraph_extra(); - /// Real GUI implementation. - FD_form_tabbed_paragraph * dialog_; - /// - FD_form_paragraph_general * general_; - /// - FD_form_paragraph_extra * extra_; - /// Which LyXView do we belong to? - LyXView * lv_; - /// - Dialogs * d_; - /// Update connection. - Connection u_; - /// Hide connection. - Connection h_; - /// has form contents changed? Used to control OK/Apply - EnumPopupStatus status; - /// - ButtonController * bc_; + /// Real GUI implementation. + FD_form_tabbed_paragraph * dialog_; + /// + FD_form_paragraph_general * general_; + /// + FD_form_paragraph_extra * extra_; }; #endif