5 #include "math_sizeinset.h"
6 #include "support/LOstream.h"
9 MathSizeInset::MathSizeInset(MathStyles st)
10 : MathNestInset(1), style_(st)
16 char const * MathSizeInset::verbose() const
20 return "displaystyle";
25 case LM_ST_SCRIPTSCRIPT:
26 return "scriptscriptstyle";
28 return "unknownstyle";
32 MathInset * MathSizeInset::clone() const
34 return new MathSizeInset(*this);
38 void MathSizeInset::draw(Painter & pain, int x, int y) const
42 xcell(0).draw(pain, x, y);
46 void MathSizeInset::metrics(MathStyles /* st */) const
48 xcell(0).metrics(style_);
49 ascent_ = xcell(0).ascent_;
50 descent_ = xcell(0).descent_;
51 width_ = xcell(0).width_;
55 void MathSizeInset::write(std::ostream & os, bool fragile) const
57 os << "{\\" << name() << " ";
58 cell(0).write(os, fragile);
63 void MathSizeInset::writeNormal(std::ostream & os) const
65 os << "[" << name() << " ";
66 cell(0).writeNormal(os);