7 #include "math_envinset.h"
8 #include "math_mathmlstream.h"
9 #include "math_streamstr.h"
10 #include "support/LOstream.h"
13 MathEnvInset::MathEnvInset(string const & name)
14 : MathNestInset(1), name_(name)
18 MathInset * MathEnvInset::clone() const
20 return new MathEnvInset(*this);
24 void MathEnvInset::metrics(MathMetricsInfo & mi) const
26 dim_ = cell(0).metrics(mi);
31 void MathEnvInset::draw(MathPainterInfo & pi, int x, int y) const
33 cell(0).draw(pi, x + 1, y);
34 drawMarkers2(pi, x, y);
38 void MathEnvInset::write(WriteStream & os) const
40 os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
44 void MathEnvInset::normalize(NormalStream & os) const
46 os << "[env " << name_ << " " << cell(0) << ']';
50 void MathEnvInset::infoize(std::ostream & os) const
52 os << "Env: " << name_;