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"
14 MathSizeInset::MathSizeInset(latexkeys const * l)
15 : MathNestInset(1), key_(l), style_(Styles(atoi(l->extra.c_str())))
19 auto_ptr<InsetBase> MathSizeInset::clone() const
21 return auto_ptr<InsetBase>(new MathSizeInset(*this));
25 void MathSizeInset::metrics(MetricsInfo & mi, Dimension & dim) const
27 StyleChanger dummy(mi.base, style_);
28 cell(0).metrics(mi, dim_);
34 void MathSizeInset::draw(PainterInfo & pi, int x, int y) const
36 StyleChanger dummy(pi.base, style_);
37 cell(0).draw(pi, x + 1, y);
38 drawMarkers(pi, x, y);
42 void MathSizeInset::write(WriteStream & os) const
44 os << "{\\" << key_->name << ' ' << cell(0) << '}';
48 void MathSizeInset::normalize(NormalStream & os) const
50 os << '[' << key_->name << ' ' << cell(0) << ']';
54 void MathSizeInset::infoize(std::ostream & os) const
56 os << "Size: " << key_->name;