]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.h
Fix GRAPHICS_EDIT of InsetGraphics
[lyx.git] / src / insets / InsetCommand.h
index 96e523a3ce4118e1f1521adf4b37e1d5839620f7..9e946745ca098ddf98c482248f75119efa7b3158 100644 (file)
@@ -56,12 +56,9 @@ public:
        InsetCommandParams const & params() const { return p_; }
        /// FIXME Remove
        docstring const getFirstNonOptParam() const { return p_.getFirstNonOptParam(); }
-       /// Whether the button label should be recomputed.
-       void refresh() { updateButtonLabel_ = true; }
        ///
        void setParam(std::string const & name, docstring const & value)
        {
-               updateButtonLabel_ = true;
                p_[name] = value;
        }
        ///
@@ -85,8 +82,10 @@ public:
        /// Whether this is a command this inset can represent.
        /// Not implemented here. Must be implemented in derived class.
        static bool isCompatibleCommand(std::string const & cmd);
-       /// update label and references. Currently used by InsetLabel.
-       virtual void update(docstring const &, bool) {};
+       /// update label and references.
+       virtual void updateCommand(docstring const &, bool) {};
+       ///
+       virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
 
 protected:
        ///
@@ -98,11 +97,7 @@ protected:
        ///
        std::string const & getCmdName() const { return p_.getCmdName(); }
        ///
-       void setCmdName(std::string const & n)
-       {
-               updateButtonLabel_ = true;
-               p_.setCmdName(n);
-       }
+       void setCmdName(std::string const & n) { p_.setCmdName(n); }
        ///
        void setParams(InsetCommandParams const &);
        /// This should provide the text for the button
@@ -116,8 +111,6 @@ private:
        /// changes color when mouse enters/leaves this inset
        bool mouse_hover_;
        ///
-       mutable bool updateButtonLabel_;
-       ///
        mutable RenderButton button_;
 };