7 #include "math_macroarg.h"
8 #include "mathed/support.h"
12 MathMacroArgument::MathMacroArgument(int n)
13 : MathParInset(LM_ST_TEXT, "", LM_OT_MACRO_ARG),
14 expnd_mode_(false), number_(n)
18 MathedInset * MathMacroArgument::Clone()
24 void MathMacroArgument::setExpand(bool e)
30 bool MathMacroArgument::getExpand() const
36 void MathMacroArgument::draw(Painter & pain, int x, int baseline)
39 MathParInset::draw(pain, x, baseline);
41 std::ostringstream ost;
42 ost << '#' << number_;
43 drawStr(pain, LM_TC_TEX, size(), x, baseline, ost.str().c_str());
47 void MathMacroArgument::Metrics()
50 MathParInset::Metrics();
52 std::ostringstream ost;
53 ost << '#' << number_;
54 width = mathed_string_width(LM_TC_TEX, size(),
56 mathed_string_height(LM_TC_TEX, size(), ost.str().c_str(),
62 void MathMacroArgument::Write(std::ostream & os, bool fragile)
65 MathParInset::Write(os, fragile);
67 os << '#' << number_ << ' ';