4 #include "math_sizeinset.h"
5 #include "math_parser.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
8 #include "math_support.h"
9 #include "support/LOstream.h"
13 MathSizeInset::MathSizeInset(latexkeys const * l)
14 : MathNestInset(1), key_(l), style_(Styles(atoi(l->extra.c_str())))
18 MathInset * MathSizeInset::clone() const
20 return new MathSizeInset(*this);
24 void MathSizeInset::metrics(MetricsInfo & mi) const
26 StyleChanger dummy(mi.base, style_);
27 dim_ = cell(0).metrics(mi);
32 void MathSizeInset::draw(PainterInfo & pi, int x, int y) const
34 StyleChanger dummy(pi.base, style_);
35 cell(0).draw(pi, x + 1, y);
36 drawMarkers2(pi, x, y);
40 void MathSizeInset::write(WriteStream & os) const
42 os << "{\\" << key_->name << ' ' << cell(0) << '}';
46 void MathSizeInset::normalize(NormalStream & os) const
48 os << '[' << key_->name << ' ' << cell(0) << ']';
52 void MathSizeInset::infoize(std::ostream & os) const
54 os << "Size: " << key_->name;