5 #include "math_sizeinset.h"
6 #include "support/LOstream.h"
9 MathSizeInset::MathSizeInset(MathStyles st)
10 : MathInset(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)
42 xcell(0).draw(pain, x, y);
46 void MathSizeInset::Metrics(MathStyles /* st */)
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);