7 #include "math_envinset.h"
8 #include "math_mathmlstream.h"
9 #include "math_streamstr.h"
12 MathEnvInset::MathEnvInset(string const & name)
13 : MathNestInset(1), name_(name)
17 MathInset * MathEnvInset::clone() const
19 return new MathEnvInset(*this);
23 void MathEnvInset::metrics(MathMetricsInfo & mi) const
26 ascent_ = xcell(0).ascent() + 1;
27 descent_ = xcell(0).descent() + 1;
28 width_ = xcell(0).width() + 2;
32 void MathEnvInset::draw(MathPainterInfo & pi, int x, int y) const
34 xcell(0).draw(pi, x + 1, y);
35 drawMarkers2(pi, x, y);
39 void MathEnvInset::write(WriteStream & os) const
41 os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
45 void MathEnvInset::normalize(NormalStream & os) const
47 os << "[env " << name_ << " " << cell(0) << ']';
51 void MathEnvInset::infoize(std::ostream & os) const
53 os << "Env: " << name_;