5 #include "math_macroarg.h"
6 #include "math_macro.h"
8 #include "mathed/support.h"
13 MathMacroArgument::MathMacroArgument(int n)
17 lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
26 MathInset * MathMacroArgument::clone() const
28 return new MathMacroArgument(*this);
32 void MathMacroArgument::draw(Painter & pain, int x, int y) const
34 drawStr(pain, LM_TC_TEX, size(), x, y, str_);
38 int MathMacroArgument::ascent() const
40 return mathed_char_ascent(LM_TC_TEX, size(), 'I');
44 int MathMacroArgument::descent() const
46 return mathed_char_descent(LM_TC_TEX, size(), 'I');
50 int MathMacroArgument::width() const
52 return mathed_string_width(LM_TC_TEX, size(), str_);
56 void MathMacroArgument::write(std::ostream & os, bool /*fragile*/) const
58 os << '#' << number_ << ' ';
62 void MathMacroArgument::writeNormal(std::ostream & os) const
64 os << "[macroarg " << number_ << "] ";
68 void MathMacroArgument::substitute(MathArray & array, MathMacro const & m) const
70 array.push_back(m.cell(number_ - 1));