]> 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 2cd2442ee50dcc44460aeaeb39c8d9091283616c..d55ae062aec0ef6bd94500fa5945c46516e1428e 100644 (file)
@@ -1,94 +1,49 @@
 // -*- 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 <boost/smart_ptr.hpp>
+#include "FormDialogView.h"
+#include "RadioButtonGroup.h"
 
-#ifdef __GNUG_
-#pragma interface
-#endif
+namespace lyx {
+namespace frontend {
 
-#include "FormBaseDeprecated.h"
-#if 1
-#include "lyxparagraph.h"
-#endif
+class ControlParagraph;
+struct FD_paragraph;
 
-struct FD_form_tabbed_paragraph;
-struct FD_form_paragraph_general;
-struct FD_form_paragraph_extra;
-
-/** This class provides an XForms implementation of the FormParagraph Popup.
- *           @author Jürgen Vigna
+/** This class provides an XForms implementation of the FormParagraph dialog.
  */
-class FormParagraph : public FormBaseBD {
+class FormParagraph
+       : public FormController<ControlParagraph, FormView<FD_paragraph> > {
 public:
        ///
-       FormParagraph(LyXView *, Dialogs *);
+       FormParagraph(Dialog &);
 private:
-       /// 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 popup
+       /// 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 ButtonPolicy::SMInput input(FL_OBJECT *, long);
 
-       ///
-       virtual FL_FORM * form() const;
-       
-       ///
-       void general_update();
-#ifndef NO_PEXTRA
-       ///
-       void extra_update();
-#endif
-       ///
-       void general_apply();
-#ifndef NO_PEXTRA
-       ///
-       void extra_apply();
-#endif
-       /// Fdesign generated methods
-       FD_form_tabbed_paragraph * build_tabbed_paragraph();
-       ///
-       FD_form_paragraph_general * build_paragraph_general();
-//#ifndef NO_PEXTRA
-       ///
-       FD_form_paragraph_extra * build_paragraph_extra();
-//#endif
-       /// Real GUI implementation.
-       boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
-       ///
-       boost::scoped_ptr<FD_form_paragraph_general> general_;
-#ifndef NO_PEXTRA
-       ///
-       boost::scoped_ptr<FD_form_paragraph_extra> extra_;
-#endif
-       /// The ButtonController
-       ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
+       /// alignment radio buttons
+       RadioButtonGroup alignment_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
-inline
-xformsBC & FormParagraph::bc()
-{
-       return bc_;
-}
 #endif