7 #include "math_sizeinset.h"
8 #include "math_parser.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
13 MathSizeInset::MathSizeInset(latexkeys const * l)
14 : MathNestInset(1), key_(l)
18 MathInset * MathSizeInset::clone() const
20 return new MathSizeInset(*this);
24 void MathSizeInset::draw(Painter & pain, int x, int y) const
26 xcell(0).draw(pain, x, y);
30 void MathSizeInset::metrics(MathMetricsInfo const & mi) const
32 MathMetricsInfo m = mi;
33 m.style = MathStyles(key_->id);
35 ascent_ = xcell(0).ascent_;
36 descent_ = xcell(0).descent_;
37 width_ = xcell(0).width_;
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) << ']';