5 #include "math_sizeinset.h"
6 #include "math_parser.h"
7 #include "support/LOstream.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
25 xcell(0).draw(pain, x, y);
29 void MathSizeInset::metrics(MathMetricsInfo const & st) const
32 size_.size = MathStyles(key_->id);
33 xcell(0).metrics(size_);
34 ascent_ = xcell(0).ascent_;
35 descent_ = xcell(0).descent_;
36 width_ = xcell(0).width_;
40 void MathSizeInset::write(MathWriteInfo & os) const
42 os << "{\\" << key_->name << ' ' << cell(0) << '}';
46 void MathSizeInset::writeNormal(std::ostream & os) const
48 os << "[" << key_->name << " ";
49 cell(0).writeNormal(os);