7 #include "math_biginset.h"
8 #include "math_support.h"
9 #include "math_parser.h"
10 #include "math_mathmlstream.h"
11 #include "math_streamstr.h"
14 MathBigInset::MathBigInset(string const & name, string const & delim)
15 : name_(name), delim_(delim)
19 MathInset * MathBigInset::clone() const
21 return new MathBigInset(*this);
25 MathBigInset::size_type MathBigInset::size() const
27 return name_.size() - 4;
31 double MathBigInset::increase() const
43 void MathBigInset::metrics(MathMetricsInfo & mi) const
45 double h = mathed_char_ascent(mi.base.font, 'I');
46 double f = increase();
48 ascent_ = int(h + f * h);
49 descent_ = int(f * h);
53 void MathBigInset::draw(MathPainterInfo & pi, int x, int y) const
55 mathed_draw_deco(pi, x + 1, y - ascent_, 4, height(), delim_);
59 void MathBigInset::write(WriteStream & os) const
61 os << '\\' << name_ << ' ' << delim_;
65 void MathBigInset::normalize(NormalStream & os) const
67 os << "[" << name_ << ' ' << delim_ << ']';