2 * \file MathMacroArgument.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS.
14 #include "MathMacroArgument.h"
15 #include "InsetMathMacro.h"
16 #include "MathMLStream.h"
17 #include "MathSupport.h"
28 MathMacroArgument::MathMacroArgument(size_t n)
32 lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
36 str_[1] = static_cast<unsigned char>('0' + n);
41 auto_ptr<InsetBase> MathMacroArgument::doClone() const
43 return auto_ptr<InsetBase>(new MathMacroArgument(*this));
47 void MathMacroArgument::write(WriteStream & os) const
53 void MathMacroArgument::metrics(MetricsInfo & mi, Dimension & dim) const
55 mathed_string_dim(mi.base.font, from_utf8(str_), dim_);
60 void MathMacroArgument::draw(PainterInfo & pi, int x, int y) const
63 drawStrRed(pi, x, y, from_utf8(str_));
64 setPosCache(pi, x, y);
68 void MathMacroArgument::normalize(NormalStream & os) const
70 os << "[macroarg " << str_ << "] ";