5 #include "math_sizeinset.h"
6 #include "math_parser.h"
7 #include "math_mathmlstream.h"
10 MathSizeInset::MathSizeInset(latexkeys const * l)
11 : MathNestInset(1), key_(l)
15 MathInset * MathSizeInset::clone() const
17 return new MathSizeInset(*this);
21 void MathSizeInset::draw(Painter & pain, int x, int y) const
23 xcell(0).draw(pain, x, y);
27 void MathSizeInset::metrics(MathMetricsInfo const & mi) const
29 MathMetricsInfo m = mi;
30 m.style = MathStyles(key_->id);
32 ascent_ = xcell(0).ascent_;
33 descent_ = xcell(0).descent_;
34 width_ = xcell(0).width_;
38 void MathSizeInset::write(WriteStream & os) const
40 os << "{\\" << key_->name.c_str() << ' ' << cell(0) << '}';
44 void MathSizeInset::normalize(NormalStream & os) const
46 os << "[" << key_->name.c_str() << ' ' << cell(0) << ']';