5 #include "math_lefteqninset.h"
8 #include "math_cursor.h"
9 #include "math_mathmlstream.h"
12 MathLefteqnInset::MathLefteqnInset()
17 MathInset * MathLefteqnInset::clone() const
19 return new MathLefteqnInset(*this);
23 void MathLefteqnInset::metrics(MathMetricsInfo const & mi) const
25 MathNestInset::metrics(mi);
26 ascent_ = xcell(0).ascent() + 2;
27 descent_ = xcell(0).descent() + 2;
32 void MathLefteqnInset::draw(Painter & pain, int x, int y) const
34 xcell(0).draw(pain, x + 2, y);
35 if (mathcursor && mathcursor->isInside(this)) {
36 pain.rectangle(x, y - ascent(), xcell(0).width(), height(),
42 void MathLefteqnInset::write(WriteStream & os) const
44 os << "\\lefteqn{" << cell(0) << '}';
48 void MathLefteqnInset::normalize(NormalStream & os) const
50 os << "[lefteqn " << cell(0) << ']';