7 #include "math_sizeinset.h"
8 #include "math_parser.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
11 #include "math_support.h"
12 #include "support/LOstream.h"
16 MathSizeInset::MathSizeInset(latexkeys const * l)
17 : MathNestInset(1), key_(l), style_(MathStyles(atoi(l->extra.c_str())))
21 MathInset * MathSizeInset::clone() const
23 return new MathSizeInset(*this);
27 void MathSizeInset::metrics(MathMetricsInfo & mi) const
29 MathStyleChanger dummy(mi.base, style_);
30 dim_ = cell(0).metrics(mi);
35 void MathSizeInset::draw(MathPainterInfo & pi, int x, int y) const
37 MathStyleChanger dummy(pi.base, style_);
38 cell(0).draw(pi, x + 1, y);
39 drawMarkers2(pi, x, y);
43 void MathSizeInset::write(WriteStream & os) const
45 os << "{\\" << key_->name << ' ' << cell(0) << '}';
49 void MathSizeInset::normalize(NormalStream & os) const
51 os << '[' << key_->name << ' ' << cell(0) << ']';
55 void MathSizeInset::infoize(std::ostream & os) const
57 os << "Size: " << key_->name;