5 #include "math_sizeinset.h"
6 #include "support/LOstream.h"
9 MathSizeInset::MathSizeInset(MathStyles st)
10 : MathNestInset(1), style_(st)
14 char const * MathSizeInset::name() const
18 return "displaystyle";
23 case LM_ST_SCRIPTSCRIPT:
24 return "scriptscriptstyle";
26 return "unknownstyle";
30 MathInset * MathSizeInset::clone() const
32 return new MathSizeInset(*this);
36 void MathSizeInset::draw(Painter & pain, int x, int y) const
40 xcell(0).draw(pain, x, y);
44 void MathSizeInset::metrics(MathStyles /* st */) const
46 xcell(0).metrics(style_);
47 ascent_ = xcell(0).ascent_;
48 descent_ = xcell(0).descent_;
49 width_ = xcell(0).width_;
53 void MathSizeInset::write(std::ostream & os, bool fragile) const
55 os << "{\\" << name() << " ";
56 cell(0).write(os, fragile);
61 void MathSizeInset::writeNormal(std::ostream & os) const
63 os << "[" << name() << " ";
64 cell(0).writeNormal(os);