]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormRef.h
controller-view split of FormLog and FormVCLog.
[lyx.git] / src / frontends / xforms / FormRef.h
index 4716b9610d5bdfa5fc19068ef4d59e041e5fe19f..85c8146cf15293b4dab238f6442cd5f6345162ec 100644 (file)
 #ifndef FORMREF_H
 #define FORMREF_H
 
+#include <boost/smart_ptr.hpp>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include "FormInset.h"
+
 struct FD_form_ref;
 
 /** This class provides an XForms implementation of the FormRef Dialog.
@@ -25,10 +28,9 @@ class FormRef : public FormCommand {
 public:
        ///
        FormRef(LyXView *, Dialogs *);
-       ///
-       ~FormRef();
-       ///
 private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
 
@@ -40,7 +42,7 @@ private:
        virtual void update();
        /// Not used but must be instantiated
        virtual void apply();
-       /// Pointer to the actual instantiation of the xform's form
+       /// Pointer to the actual instantiation of the xforms form
        virtual FL_FORM * form() const;
 
        ///
@@ -54,7 +56,15 @@ private:
        std::vector<string> refs;
 
        /// Real GUI implementation.
-       FD_form_ref * dialog_;
+       boost::scoped_ptr<FD_form_ref> dialog_;
+       /// The ButtonController
+       ButtonController<NoRepeatedApplyPolicy, xformsBC> bc_;
 };
 
+
+inline
+xformsBC & FormRef::bc()
+{
+       return bc_;
+}
 #endif