- font_metrics::rectText(params_.type, font, w, a, d);
- pi.pain.rectText(x + (dim_.wid - w) / 2,
- y + InsetText::descent() + a,
- params_.type, font, LColor::none, LColor::none);
+ // FIXME UNICODE
+ docstring s(from_utf8(params_.type));
+ if (undefined())
+ s = _("Undef: ") + s;
+ theFontMetrics(font).rectText(s, w, a, d);
+ pi.pain.rectText(x + (dim_.wid - w) / 2, y + desc + a,
+ s, 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 - 3, y + 4, x + dim_.wid - 3, y,
+ params_.labelfont.color());
+ pi.pain.line(x + dim_.wid - 7, y, x + dim_.wid - 3, y,
+ params_.labelfont.color());