setMouseHover() functions can be const.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35802 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-10-24 19:24:36 +00:00
parent 8a550ba48a
commit a77d991e24
5 changed files with 6 additions and 3 deletions

View 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()).

View 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;

View 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(); }

View 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;

View 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);