]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.h
Final touch 'inset display()'; fix 'is a bit silly' bug
[lyx.git] / src / insets / insetcommand.h
index 6d28ee9b90f19d92aa778aa991330c74b5f34c60..969f987da073b53f902ec245907b8b9b6acc5625 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "inset.h"
 #include "insetcommandparams.h"
-#include "renderers.h"
+#include "render_button.h"
 #include "mailinset.h"
 
 // Created by Alejandro 970222
@@ -55,11 +55,11 @@ public:
        virtual int docbook(Buffer const &, std::ostream &, bool) const;
        ///
        InsetOld::Code lyxCode() const { return InsetOld::NO_CODE; }
-
        ///
-       InsetCommandParams const & params() const { return p_; }
+       virtual bool display() const { return true; }
+       
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd);
+       InsetCommandParams const & params() const { return p_; }
        ///
        std::string const & getContents() const { return p_.getContents(); }
        ///
@@ -67,9 +67,13 @@ public:
        ///
        std::string const & getOptions() const { return p_.getOptions(); }
        ///
-       ButtonRenderer & button() const { return button_; }
+       RenderButton & button() const { return button_; }
 
 protected:
+       ///
+       virtual
+       dispatch_result
+       priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
        ///
        std::string const getCommand() const { return p_.getCommand(); }
        ///
@@ -80,8 +84,6 @@ protected:
        void setOptions(std::string const & o) { p_.setOptions(o); }
        ///
        void setParams(InsetCommandParams const &);
-       ///
-       virtual BufferView * view() const;
        /// This should provide the text for the button
        virtual std::string const getScreenLabel(Buffer const &) const = 0;
 
@@ -89,7 +91,7 @@ private:
        ///
        InsetCommandParams p_;
        mutable bool set_label_;
-       mutable ButtonRenderer button_;
+       mutable RenderButton button_;
 };