7 #include "math_macroarg.h"
8 #include "math_macro.h"
10 #include "mathed/support.h"
11 #include "support/LAssert.h"
16 MathMacroArgument::MathMacroArgument(int n)
20 lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
27 MathInset * MathMacroArgument::clone() const
29 return new MathMacroArgument(*this);
33 void MathMacroArgument::draw(Painter & pain, int x, int y)
37 drawStr(pain, LM_TC_TEX, size(), x, y, str);
41 void MathMacroArgument::Metrics(MathStyles st)
46 mathed_string_dim(LM_TC_TEX, size(), str, ascent_, descent_, width_);
50 void MathMacroArgument::Write(std::ostream & os, bool /*fragile*/) const
52 os << '#' << number_ << ' ';
56 void MathMacroArgument::WriteNormal(std::ostream & os) const
58 os << "[macroarg " << number_ << "] ";
62 void MathMacroArgument::substitute(MathArray & array, MathMacro const & m) const
64 array.push_back(m.cell(number_ - 1));