7 #include "math_sizeinset.h"
10 MathSizeInset::MathSizeInset(MathStyles st)
11 : MathInset("", LM_OT_SIMPLE, 1), style_(st)
16 char const * MathSizeInset::verbose() const
20 return "displaystyle";
25 case LM_ST_SCRIPTSCRIPT:
26 return "scriptscriptstyle";
28 return "unknownstyle";
31 MathInset * MathSizeInset::Clone() const
33 return new MathSizeInset(*this);
37 void MathSizeInset::draw(Painter & pain, int x, int y)
41 xcell(0).draw(pain, x, y);
45 void MathSizeInset::Metrics(MathStyles /* st */)
47 xcell(0).Metrics(style_);
48 ascent_ = xcell(0).ascent_;
49 descent_ = xcell(0).descent_;
50 width_ = xcell(0).width_;
54 void MathSizeInset::Write(std::ostream & os, bool fragile) const
56 os << "{\\" << name() << " ";
57 cell(0).Write(os, fragile);
62 void MathSizeInset::WriteNormal(std::ostream & os) const
64 os << "[" << name() << " ";
65 cell(0).WriteNormal(os);