3 #include "math_biginset.h"
4 #include "math_support.h"
5 #include "math_parser.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
10 MathBigInset::MathBigInset(string const & name, string const & delim)
11 : name_(name), delim_(delim)
15 InsetBase * MathBigInset::clone() const
17 return new MathBigInset(*this);
21 MathBigInset::size_type MathBigInset::size() const
23 return name_.size() - 4;
27 double MathBigInset::increase() const
38 void MathBigInset::metrics(MetricsInfo & mi, Dimension & dim) const
40 double const h = mathed_char_ascent(mi.base.font, 'I');
41 double const f = increase();
43 dim_.asc = int(h + f * h);
44 dim_.des = int(f * h);
49 void MathBigInset::draw(PainterInfo & pi, int x, int y) const
51 mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 4, dim_.height(), delim_);
55 void MathBigInset::write(WriteStream & os) const
57 os << '\\' << name_ << ' ' << delim_;
61 void MathBigInset::normalize(NormalStream & os) const
63 os << '[' << name_ << ' ' << delim_ << ']';