7 #include "math_sizeinset.h"
8 #include "support/LOstream.h"
11 MathSizeInset::MathSizeInset(MathStyles st)
12 : MathInset(1), style_(st)
18 char const * MathSizeInset::verbose() const
22 return "displaystyle";
27 case LM_ST_SCRIPTSCRIPT:
28 return "scriptscriptstyle";
30 return "unknownstyle";
34 MathInset * MathSizeInset::clone() const
36 return new MathSizeInset(*this);
40 void MathSizeInset::draw(Painter & pain, int x, int y)
44 xcell(0).draw(pain, x, y);
48 void MathSizeInset::Metrics(MathStyles /* st */, int, int)
50 xcell(0).Metrics(style_);
51 ascent_ = xcell(0).ascent_;
52 descent_ = xcell(0).descent_;
53 width_ = xcell(0).width_;
57 void MathSizeInset::Write(std::ostream & os, bool fragile) const
59 os << "{\\" << name() << " ";
60 cell(0).Write(os, fragile);
65 void MathSizeInset::WriteNormal(std::ostream & os) const
67 os << "[" << name() << " ";
68 cell(0).WriteNormal(os);