]> git.lyx.org Git - lyx.git/blob - src/mathed/math_lefteqninset.C
Prepare mathed for unified two-stage drawing
[lyx.git] / src / mathed / math_lefteqninset.C
1
2 #include "math_lefteqninset.h"
3 #include "math_support.h"
4 #include "support/LOstream.h"
5
6
7 MathLefteqnInset::MathLefteqnInset()
8         : MathNestInset(1)
9 {}
10
11
12 MathInset * MathLefteqnInset::clone() const
13 {
14         return new MathLefteqnInset(*this);
15 }
16
17
18 Dimension MathLefteqnInset::metrics(MetricsInfo & mi) const
19 {
20         cell(0).metrics(mi);
21         dim_.asc = cell(0).ascent() + 2;
22         dim_.des = cell(0).descent() + 2;
23         dim_.wid = 4;
24         metricsMarkers();
25         return dim_;
26 }
27
28
29 void MathLefteqnInset::draw(PainterInfo & pi, int x, int y) const
30 {
31         cell(0).draw(pi, x + 2, y);
32         drawMarkers(pi, x, y);
33 }
34
35
36 string MathLefteqnInset::name() const
37 {
38         return "lefteqn";
39 }
40
41
42 void MathLefteqnInset::infoize(std::ostream & os) const
43 {
44         os << "Lefteqn ";
45 }