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 void MathEnvInset::metrics(MetricsInfo & mi) const
23 dim_ = cell(0).metrics(mi);
28 void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
30 cell(0).draw(pi, x + 1, y);
31 drawMarkers2(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_;