- return nuc ? nuc->width() : mathed_char_width(font_, '.');
-}
-
-
-int MathScriptInset::nasc(MathInset const * nuc) const
-{
- return nuc ? nuc->ascent() : mathed_char_ascent(font_, 'I');
-}
-
-
-int MathScriptInset::ndes(MathInset const * nuc) const
-{
- return nuc ? nuc->descent() : mathed_char_descent(font_, 'I');
-}
-
-
-void MathScriptInset::metrics(MathMetricsInfo & mi) const
-{
- metrics(0, mi);
-}
-
-
-void MathScriptInset::metrics(MathInset const * nuc, MathMetricsInfo & mi) const
-{
- if (nuc)
- nuc->metrics(mi);
- MathNestInset::metrics(mi);
- MathScriptChanger dummy(mi.base);
- ascent_ = ascent2(nuc);
- descent_ = descent2(nuc);
- width_ = width2(nuc);
-}
-
-
-void MathScriptInset::draw(MathPainterInfo & pi, int x, int y) const
-{
- //lyxerr << "unexpected call to MathScriptInset::draw()\n";
- draw(0, pi, x, y);
-}
-
-
-void MathScriptInset::draw(MathInset const * nuc, MathPainterInfo & pi,
- int x, int y) const
-{
- if (nuc)
- nuc->draw(pi, x + dxx(nuc), y);
- else if (editing())
- drawStr(pi, font_, x + dxx(nuc), y, ".");
-
- MathScriptChanger dummy(pi.base);
+ if (nuc().size())
+ nuc().draw(pi, x + dxx(), y);
+ else {
+ nuc().setXY(x + dxx(), y);
+ if (editing(pi.base.bv))
+ drawStr(pi, pi.base.font, x + dxx(), y, ".");
+ }
+ ScriptChanger dummy(pi.base);