3 #include "math_sizeinset.h"
4 #include "math_parser.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "math_support.h"
8 #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, Dimension & dim) const
26 StyleChanger dummy(mi.base, style_);
27 cell(0).metrics(mi, dim_);
33 void MathSizeInset::draw(PainterInfo & pi, int x, int y) const
35 StyleChanger dummy(pi.base, style_);
36 cell(0).draw(pi, x + 1, y);
37 drawMarkers(pi, x, y);
41 void MathSizeInset::write(WriteStream & os) const
43 os << "{\\" << key_->name << ' ' << cell(0) << '}';
47 void MathSizeInset::normalize(NormalStream & os) const
49 os << '[' << key_->name << ' ' << cell(0) << ']';
53 void MathSizeInset::infoize(std::ostream & os) const
55 os << "Size: " << key_->name;