3 #include "math_envinset.h"
4 #include "math_mathmlstream.h"
5 #include "math_streamstr.h"
6 #include "support/LOstream.h"
9 MathEnvInset::MathEnvInset(string const & name)
10 : MathNestInset(1), name_(name)
14 MathInset * MathEnvInset::clone() const
16 return new MathEnvInset(*this);
20 void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const
22 cell(0).metrics(mi, dim_);
28 void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
30 cell(0).draw(pi, x + 1, y);
31 drawMarkers(pi, x, y);
35 void MathEnvInset::write(WriteStream & os) const
37 os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
41 void MathEnvInset::normalize(NormalStream & os) const
43 os << "[env " << name_ << ' ' << cell(0) << ']';
47 void MathEnvInset::infoize(std::ostream & os) const
49 os << "Env: " << name_;