+ if (updateButtonLabel_) {
+ updateButtonLabel_ = false;
+ button_.update(getScreenLabel(*mi.base.bv->buffer()),
+ 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);
+}
+
+
+void InsetCommand::setParams(InsetCommandParams const & p)
+{
+ p_ = p;
+ updateButtonLabel_ = true;