]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormParagraph.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormParagraph.h
index 3e6d1b105d2690dee34a409b498bdde31a4ed112..224b4b4a9ea871f94e5de561e998b0d307152e64 100644 (file)
@@ -4,7 +4,7 @@
  * 
  *           LyX, The Document Processor
  *      
- *           Copyright (C) 2000 The LyX Team.
+ *           Copyright 2000-2001 The LyX Team.
  *
  *           @author Jürgen Vigna
  *
 #ifndef FORM_PARAGRAPH_H
 #define FORM_PARAGRAPH_H
 
-#include "FormBase.h"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG_
 #pragma interface
 #endif
 
+#include "FormBaseDeprecated.h"
 
-struct FD_form_tabbed_paragraph;
-struct FD_form_paragraph_general;
-struct FD_form_paragraph_extra;
+class Paragraph;
+struct FD_form_paragraph;
 
-/** This class provides an XForms implementation of the FormParagraph Popup.
+/** This class provides an XForms implementation of the FormParagraph dialog.
  *           @author Jürgen Vigna
  */
 class FormParagraph : public FormBaseBD {
 public:
        ///
        FormParagraph(LyXView *, Dialogs *);
-       ///
-       ~FormParagraph();
-
 private:
-       /// Build the popup
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+       /** Redraw the form (on receipt of a Signal indicating, for example,
+           that the xforms colours have been re-mapped). */
+       virtual void redraw();
+       /// Build the dialog
        virtual void build();
-       /// Apply from popup
+       /// Apply from dialog
        virtual void apply();
-       /// Update the popup.
+       /// Update the dialog
        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();
+       /// Connect signals
+       virtual void connect();
+       /// Disconnect signals
+       virtual void disconnect();
        ///
-       void extra_apply();
-
-       /// Typedefinitions from the fdesign produced Header file
-       FD_form_tabbed_paragraph * build_tabbed_paragraph();
+       void changedParagraph();
        ///
-       FD_form_paragraph_general * build_paragraph_general();
+       Paragraph const * getCurrentParagraph() const;
        ///
-       FD_form_paragraph_extra * build_paragraph_extra();
+       virtual FL_FORM * form() const;
+       
+       /// Fdesign generated method
+       FD_form_paragraph * build_paragraph();
 
        /// Real GUI implementation.
-       FD_form_tabbed_paragraph  * dialog_;
-       ///
-       FD_form_paragraph_general * general_;
-       ///
-       FD_form_paragraph_extra   * extra_;
+       boost::scoped_ptr<FD_form_paragraph> dialog_;
+
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
+
+       /// Changed Paragraph connection.
+       SigC::Connection cp_;
+
+       /// The current Paragraph
+       Paragraph const * par_;
 };
 
+
+inline
+xformsBC & FormParagraph::bc()
+{
+       return bc_;
+}
 #endif