4 #include "math_envinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "support/LOstream.h"
10 MathEnvInset::MathEnvInset(string const & name)
11 : MathNestInset(1), name_(name)
15 MathInset * MathEnvInset::clone() const
17 return new MathEnvInset(*this);
21 Dimension MathEnvInset::metrics(MetricsInfo & mi) const
23 cell(0).metrics(mi, dim_);
29 void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
31 cell(0).draw(pi, x + 1, y);
32 drawMarkers(pi, x, y);
36 void MathEnvInset::write(WriteStream & os) const
38 os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
42 void MathEnvInset::normalize(NormalStream & os) const
44 os << "[env " << name_ << ' ' << cell(0) << ']';
48 void MathEnvInset::infoize(std::ostream & os) const
50 os << "Env: " << name_;