- bool drawBox = lyxrc.macro_edit_style == LyXRC::MACRO_EDIT_INLINE_BOX
- && d->editing_[pi.base.bv];
-
- // warm up cells
- for (size_t i = 0; i < nargs(); ++i)
- cell(i).setXY(*pi.base.bv, x, y);
-
- if (drawBox) {
- // draw header and rectangle around
- FontInfo font = pi.base.font;
- augmentFont(font, "lyxtex");
- font.setSize(FONT_SIZE_TINY);
- font.setColor(Color_mathmacrolabel);
- Dimension namedim;
- mathed_string_dim(font, name(), namedim);
-
- pi.pain.fillRectangle(x, y - dim.asc, dim.wid, 1 + namedim.height() + 1, Color_mathmacrobg);
- pi.pain.text(x + 1, y - dim.asc + namedim.asc + 2, name(), font);
- expx += (dim.wid - d->expanded_.dimension(*pi.base.bv).width()) / 2;
- }
-
- beforeDraw(pi);
- d->expanded_.draw(pi, expx, expy);
- afterDraw(pi);
-
- if (drawBox)
- pi.pain.rectangle(x, y - dim.asc, dim.wid,
- dim.height(), Color_mathmacroframe);