7 #include "math_macro.h"
8 #include "math_macroarg.h"
9 #include "mathed/support.h"
16 MathMacroArgument::MathMacroArgument(int n)
17 : MathedInset(string(), LM_OT_MACRO_ARG, LM_ST_TEXT),
21 lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
27 MathedInset * MathMacroArgument::Clone()
29 //return new MathMacroArgument(*this);
33 int MathMacroArgument::number() const
38 void MathMacroArgument::substitute(MathMacro * /*m*/)
40 lyxerr << "Calling MathMacroArgument::substitute!\n";
41 //return m->arg(number_)->Clone();
45 void MathMacroArgument::draw(Painter & pain, int x, int y)
49 drawStr(pain, LM_TC_TEX, size(), x, y, str);
53 void MathMacroArgument::Metrics()
57 width = mathed_string_width(LM_TC_TEX, size(), str);
58 mathed_string_height(LM_TC_TEX, size(), str, ascent, descent);
62 void MathMacroArgument::Write(std::ostream & os, bool /*fragile*/)
64 os << '#' << number_ << ' ';
68 void MathMacroArgument::WriteNormal(std::ostream & os)
70 os << "{macroarg " << number_ << "} ";