]> git.lyx.org Git - lyx.git/blob - src/mathed/math_lefteqninset.C
Standardise the header blurb in mathed.
[lyx.git] / src / mathed / math_lefteqninset.C
1 /**
2  * \file math_lefteqninset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_lefteqninset.h"
14 #include "math_support.h"
15 #include "support/LOstream.h"
16
17 using std::auto_ptr;
18
19
20 MathLefteqnInset::MathLefteqnInset()
21         : MathNestInset(1)
22 {}
23
24
25 auto_ptr<InsetBase> MathLefteqnInset::clone() const
26 {
27         return auto_ptr<InsetBase>(new MathLefteqnInset(*this));
28 }
29
30
31 void MathLefteqnInset::metrics(MetricsInfo & mi, Dimension & dim) const
32 {
33         cell(0).metrics(mi);
34         dim_.asc = cell(0).ascent() + 2;
35         dim_.des = cell(0).descent() + 2;
36         dim_.wid = 4;
37         metricsMarkers();
38         dim = dim_;
39 }
40
41
42 void MathLefteqnInset::draw(PainterInfo & pi, int x, int y) const
43 {
44         cell(0).draw(pi, x + 2, y);
45         drawMarkers(pi, x, y);
46 }
47
48
49 string MathLefteqnInset::name() const
50 {
51         return "lefteqn";
52 }
53
54
55 void MathLefteqnInset::infoize(std::ostream & os) const
56 {
57         os << "Lefteqn ";
58 }