#include "MathParser.h"
#include "MathSupport.h"
+#include "Buffer.h"
#include "Cursor.h"
#include "debug.h"
#include "gettext.h"
}
-auto_ptr<InsetBase> MathMacroTemplate::doClone() const
+auto_ptr<Inset> MathMacroTemplate::doClone() const
{
- return auto_ptr<InsetBase>(new MathMacroTemplate(*this));
+ return auto_ptr<Inset>(new MathMacroTemplate(*this));
}
+ theFontMetrics(mi.base.font).width(dp);
dim.asc = std::max(cell(0).ascent(), cell(1).ascent()) + 7;
dim.des = std::max(cell(0).descent(), cell(1).descent()) + 7;
-
+
if (lockMacro)
MacroTable::globalMacros().get(name_).unlock();
-
+
if (dim_ == dim)
return false;
dim_ = dim;
bool lockMacro = MacroTable::globalMacros().has(name_);
if (lockMacro)
MacroTable::globalMacros().get(name_).lock();
-
+
setPosCache(p, x, y);
// label
- LyXFont font = p.base.font;
+ Font font = p.base.font;
font.setColor(Color::math);
PainterInfo pi(p.base.bv, p.pain);
cell(1).draw(pi, x + 8 + w0, y + 1);
pi.pain.rectangle(x + w0 + 6, y - dim_.ascent() + 3,
w1 + 4, dim_.height() - 6, Color::mathline);
-
+
if (lockMacro)
MacroTable::globalMacros().get(name_).unlock();
}
}
-int MathMacroTemplate::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+int MathMacroTemplate::plaintext(Buffer const & buf, odocstream & os,
+ OutputParams const &) const
{
- static docstring const str = '[' + _("math macro") + ']';
+ static docstring const str = '[' + buf.B_("math macro") + ']';
os << str;
return str.size();