]> git.lyx.org Git - features.git/commitdiff
setMouseHover() functions can be const.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 24 Oct 2010 19:24:36 +0000 (19:24 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 24 Oct 2010 19:24:36 +0000 (19:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35802 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/Inset.h
src/insets/InsetCollapsable.cpp
src/insets/InsetCollapsable.h
src/insets/InsetCommand.cpp
src/insets/InsetCommand.h

index 5ff1d53275c79045172e5e6e0dd4d14f12d79e99..baf58bf773d55d0b0bfc3475f348c2a2d8a260ea 100644 (file)
@@ -286,7 +286,8 @@ public:
                { return false; }
        /// is called when the mouse enters or leaves this inset
        /// return true if this inset needs a repaint
-       virtual bool setMouseHover(BufferView const *, bool) { return false; }
+       virtual bool setMouseHover(BufferView const *, bool) const
+               { return false; }
        /// return true if this inset is hovered (under mouse)
        /// This is by now only used by mathed to draw corners 
        /// (Inset::drawMarkers() and Inset::drawMarkers2()).
index ccb26a5dff8c25f4913f8866ac335c03a75b9e22..48ae8a8df02eb11de1fed717e3b966d4952c9b52 100644 (file)
@@ -238,6 +238,7 @@ void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const
 
 
 bool InsetCollapsable::setMouseHover(BufferView const * bv, bool mouse_hover)
+       const
 {
        mouse_hover_[bv] = mouse_hover;
        return true;
index 3bdac339980f9c3b15dbdc4aee18957334fb28f8..5a317bdba76609465e0cc52c0e2f2de0f37ac9f6 100644 (file)
@@ -127,7 +127,7 @@ public:
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       bool setMouseHover(BufferView const * bv, bool mouse_hover);
+       bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
        ///
        ColorCode backgroundColor(PainterInfo const &) const
                { return getLayout().bgcolor(); }
index f02477afab86996b435b7bbf5a141c8f19c22673..feed4dbe4beaf431477437a0550b22ff767a6c9c 100644 (file)
@@ -86,6 +86,7 @@ void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
 
 
 bool InsetCommand::setMouseHover(BufferView const * bv, bool mouse_hover)
+       const
 {
        mouse_hover_[bv] = mouse_hover;
        return true;
index 911ddf30428b7f99f617cd717440b2f3f3a8fcb6..990ac2abd2e54bea1e6fe76068a536118496df55 100644 (file)
@@ -101,7 +101,7 @@ private:
        ///
        RenderButton & button() const { return button_; }
        ///
-       bool setMouseHover(BufferView const * bv, bool mouse_hover);
+       bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
        /// Return parameter information for command cmdName.
        /// Not implemented here. Must be implemented in derived class.
        static ParamInfo const & findInfo(std::string const & cmdName);