]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormParagraph.h
Change the semantics of 'none' and 'auto' viewers/editors: 'none' means now
[lyx.git] / src / frontends / xforms / FormParagraph.h
index ca2b970bc6f5d16ea38172c13e0b8061f9501fd2..d55ae062aec0ef6bd94500fa5945c46516e1428e 100644 (file)
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *           Copyright (C) 2000 The LyX Team.
+/**
+ * \file FormParagraph.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           @author Jürgen Vigna
+ * \author Jürgen Vigna
  *
- *======================================================*/
+ * Full author contact details are available in file CREDITS.
+ */
 
 #ifndef FORM_PARAGRAPH_H
 #define FORM_PARAGRAPH_H
 
-#include "DialogBase.h"
-#include "support/utility.hpp"
-#include <vector>
-
-#ifdef __GNUG_
-#pragma interface
-#endif
-
-class LyXView;
-class Dialogs;
-class NoRepeatedApplyReadOnlyPolicy;
-//template <class x> class ButtonController;
-class ButtonController;
+#include "FormDialogView.h"
+#include "RadioButtonGroup.h"
 
-struct FD_form_tabbed_paragraph;
-struct FD_form_paragraph_general;
-struct FD_form_paragraph_extra;
+namespace lyx {
+namespace frontend {
 
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
+class ControlParagraph;
+struct FD_paragraph;
 
-/** This class provides an XForms implementation of the FormParagraph Popup.
-    The table-layout-form here changes values for latex-tabulars
+/** This class provides an XForms implementation of the FormParagraph dialog.
  */
-class FormParagraph : public DialogBase, public noncopyable {
+class FormParagraph
+       : public FormController<ControlParagraph, FormView<FD_paragraph> > {
 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,
-       ///
-        POPUP_READONLY
-    };
-
+       FormParagraph(Dialog &);
 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);
-
-
-    /// 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/*<NoRepeatedApplyReadOnlyPolicy>*/ * bc_;
+       /// Build the dialog
+       virtual void build();
+       /// Apply from dialog
+       virtual void apply();
+       /// Update the dialog
+       virtual void update();
+
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       /// alignment radio buttons
+       RadioButtonGroup alignment_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif