string const & mailer_name)
: p_(p),
mailer_name_(mailer_name),
+ mouse_hover_(false),
updateButtonLabel_(true)
{}
}
-void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
{
if (updateButtonLabel_) {
updateButtonLabel_ = false;
editable() != NOT_EDITABLE);
}
button_.metrics(mi, dim);
+ bool const changed = dim_ != dim;
dim_ = dim;
+ return changed;
+}
+
+
+bool InsetCommand::setMouseHover(bool mouse_hover)
+{
+ mouse_hover_ = mouse_hover;
+ return true;
}
void InsetCommand::draw(PainterInfo & pi, int x, int y) const
{
setPosCache(pi, x, y);
+ button_.setRenderState(mouse_hover_);
button_.draw(pi, x, y);
}