7 #include "math_sizeinset.h"
8 #include "math_parser.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
11 #include "math_support.h"
14 MathSizeInset::MathSizeInset(latexkeys const * l)
15 : MathNestInset(1), key_(l)
19 MathInset * MathSizeInset::clone() const
21 return new MathSizeInset(*this);
25 void MathSizeInset::metrics(MathMetricsInfo & mi) const
27 //MathStyleChanger dummy(mi.base, MathStyles(key_->id));
29 ascent_ = xcell(0).ascent() + 1;
30 descent_ = xcell(0).descent() + 1;
31 width_ = xcell(0).width() + 2;
35 void MathSizeInset::draw(MathPainterInfo & pi, int x, int y) const
37 //MathStyleChanger dummy(pi.base, MathStyles(key_->id));
38 xcell(0).draw(pi, x + 1, y);
39 mathed_draw_framebox(pi, x, y, this);
43 void MathSizeInset::write(WriteStream & os) const
45 os << "{\\" << key_->name << ' ' << cell(0) << '}';
49 void MathSizeInset::normalize(NormalStream & os) const
51 os << "[" << key_->name << ' ' << cell(0) << ']';