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