: value_(value), macroName_(macroName) {}
///
bool metrics(MetricsInfo & mi, Dimension & dim) const;
: value_(value), macroName_(macroName) {}
///
bool metrics(MetricsInfo & mi, Dimension & dim) const;
MacroData const & macro = MacroTable::globalMacros().get(name());
if (macro.locked()) {
mathed_string_dim(mi.base.font, "Self reference: " + name(), dim);
MacroData const & macro = MacroTable::globalMacros().get(name());
if (macro.locked()) {
mathed_string_dim(mi.base.font, "Self reference: " + name(), dim);
} else if (editing(mi.base.bv)) {
// FIXME UNICODE
asArray(macro.def(), tmpl_);
} else if (editing(mi.base.bv)) {
// FIXME UNICODE
asArray(macro.def(), tmpl_);
// FIXME UNICODE
int ww = mathed_string_width(font, from_ascii("#1: "));
for (idx_type i = 0; i < nargs(); ++i) {
// FIXME UNICODE
int ww = mathed_string_width(font, from_ascii("#1: "));
for (idx_type i = 0; i < nargs(); ++i) {
c.metrics(mi);
dim.wid = max(dim.wid, c.width() + ww);
dim.des += c.height() + 10;
c.metrics(mi);
dim.wid = max(dim.wid, c.width() + ww);
dim.des += c.height() + 10;
} else {
// create MathMacroArgumentValue object pointing to the cells of the macro
MacroData const & macro = MacroTable::globalMacros().get(name());
} else {
// create MathMacroArgumentValue object pointing to the cells of the macro
MacroData const & macro = MacroTable::globalMacros().get(name());
for (size_t i = 0; i != nargs(); ++i)
values[i].insert(0, MathAtom(new MathMacroArgumentValue(&cells_[i], name())));
macro.expand(values, expanded_);
for (size_t i = 0; i != nargs(); ++i)
values[i].insert(0, MathAtom(new MathMacroArgumentValue(&cells_[i], name())));
macro.expand(values, expanded_);
// FIXME UNICODE
drawStrRed(pi, x, y, "Self reference: " + name());
} else if (editing(pi.base.bv)) {
// FIXME UNICODE
drawStrRed(pi, x, y, "Self reference: " + name());
} else if (editing(pi.base.bv)) {
augmentFont(font, from_ascii("lyxtex"));
int h = y - dim_.ascent() + 2 + tmpl_.ascent();
pi.pain.text(x + 3, h, name(), font);
augmentFont(font, from_ascii("lyxtex"));
int h = y - dim_.ascent() + 2 + tmpl_.ascent();
pi.pain.text(x + 3, h, name(), font);
docstring t = from_ascii("#1: ");
mathed_string_dim(font, t, ldim);
for (idx_type i = 0; i < nargs(); ++i) {
docstring t = from_ascii("#1: ");
mathed_string_dim(font, t, ldim);
for (idx_type i = 0; i < nargs(); ++i) {
h += max(c.ascent(), ldim.asc) + 5;
c.draw(pi, x + ldim.wid, h);
char_type str[] = { '#', '1', ':', '\0' };
h += max(c.ascent(), ldim.asc) + 5;
c.draw(pi, x + ldim.wid, h);
char_type str[] = { '#', '1', ':', '\0' };