5 #include "math_scopeinset.h"
9 #include "support/LOstream.h"
12 MathScopeInset::MathScopeInset()
17 MathInset * MathScopeInset::clone() const
19 return new MathScopeInset(*this);
23 void MathScopeInset::metrics(MathStyles st) const
27 ascent_ = xcell(0).ascent();
28 descent_ = xcell(0).descent();
29 width_ = xcell(0).width() + mathed_string_width(LM_TC_TEX, st, "{}");
33 void MathScopeInset::draw(Painter & pain, int x, int y) const
37 int d = mathed_char_width(LM_TC_TEX, size_, '{');
38 drawChar(pain, LM_TC_TEX, size_, x, y, '{');
39 xcell(0).draw(pain, x + d, y);
40 drawChar(pain, LM_TC_TEX, size_, x + width_ - d, y, '}');
41 //pain.rectangle(x, y - ascent_, width_, height(), LColor::mathline);
45 void MathScopeInset::write(std::ostream & os, bool fragile) const
48 cell(0).write(os, fragile);
53 void MathScopeInset::writeNormal(std::ostream & os) const
56 cell(0).writeNormal(os);