}
-auto_ptr<InsetBase> InsetCharStyle::clone() const
+auto_ptr<InsetBase> InsetCharStyle::doClone() const
{
return auto_ptr<InsetBase>(new InsetCharStyle(*this));
}
int desc = InsetText::descent();
if (has_label_)
desc -= ascent();
-
+
pi.pain.line(x, y + desc - 4, x, y + desc, params_.labelfont.color());
- pi.pain.line(x, y + desc, x + dim_.wid - 2, y + desc,
+ pi.pain.line(x, y + desc, x + dim_.wid - 2, y + desc,
params_.labelfont.color());
- pi.pain.line(x + dim_.wid - 2, y + desc, x + dim_.wid - 2, y + desc - 4,
+ pi.pain.line(x + dim_.wid - 2, y + desc, x + dim_.wid - 2, y + desc - 4,
params_.labelfont.color());
-
+
// the name of the charstyle. Can be toggled.
if (has_label_) {
LyXFont font(params_.labelfont);
pi.pain.rectText(x + (dim_.wid - w) / 2, y + desc + a,
params_.type, font, LColor::none, LColor::none);
}
-
+
// a visual clue when the cursor is inside the inset
LCursor & cur = pi.base.bv->cursor();
if (cur.isInside(this)) {
y -= ascent();
pi.pain.line(x, y + 4, x, y, params_.labelfont.color());
pi.pain.line(x + 4, y, x, y, params_.labelfont.color());
- pi.pain.line(x + dim_.wid - 2, y + 4, x + dim_.wid - 2, y,
+ pi.pain.line(x + dim_.wid - 2, y + 4, x + dim_.wid - 2, y,
params_.labelfont.color());
- pi.pain.line(x + dim_.wid - 6, y, x + dim_.wid - 2, y,
+ pi.pain.line(x + dim_.wid - 6, y, x + dim_.wid - 2, y,
params_.labelfont.color());
}
}
}
-void InsetCharStyle::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetCharStyle::doDispatch(LCursor & cur, FuncRequest & cmd)
{
setStatus(Inlined);
switch (cmd.action) {
if (cmd.button() == mouse_button::button3)
has_label_ = !has_label_;
else
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
break;
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
case LFUN_BREAKPARAGRAPH_SKIP:
status.enabled(false);
return true;
-
+
default:
return InsetCollapsable::getStatus(cur, cmd, status);
}