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(MathStyles /* st */) const
31 xcell(0).metrics(MathStyles(key_->id));
32 ascent_ = xcell(0).ascent_;
33 descent_ = xcell(0).descent_;
34 width_ = xcell(0).width_;
38 void MathSizeInset::write(std::ostream & os, bool fragile) const
40 os << "{\\" << key_->name << " ";
41 cell(0).write(os, fragile);
46 void MathSizeInset::writeNormal(std::ostream & os) const
48 os << "[" << key_->name << " ";
49 cell(0).writeNormal(os);