]> 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 f314d837fd5fd025020faa3f1b6c002e11549402..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,70 +28,43 @@ class FormRef : public FormCommand {
 public:
        ///
        FormRef(LyXView *, Dialogs *);
-       ///
-       ~FormRef();
 private:
-       ///
-       enum Type{
-               ///
-               REF,
-               ///
-               PAGEREF,
-               ///
-               VREF,
-               ///
-               VPAGEREF,
-               ///
-               PRETTYREF
-       };
-       ///
-       enum Goto{
-               ///
-               GOREF,
-               ///
-               GOBACK,
-               ///
-               GOFIRST
-       };
-
-       /// Connect signals etc. Set form's max size.
-       virtual void connect();
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
        /// Disconnect signals. Also perform any necessary housekeeping.
        virtual void disconnect();
 
        /// Build the dialog
        virtual void build();
        /// Filter the input
-       virtual bool input( FL_OBJECT *, long );
+       virtual bool input(FL_OBJECT *, long);
        /// Update dialog before showing it
        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;
 
        ///
-       void updateBrowser( std::vector<string> ) const;
-       ///
-       void showBrowser() const;
-       ///
-       void hideBrowser() const;
-       ///
-       void setSize( int, int, int ) const;
+       void updateBrowser(std::vector<string> const &) const;
        ///
        FD_form_ref * build_ref();
-       ///
-       Type getType() const;
-       ///
-       string getName( Type type ) const;
 
        ///
-       Goto toggle;
+       bool at_ref;
        /// 
        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