]> git.lyx.org Git - features.git/blob - src/mathed/math_lefteqninset.C
Replace LString.h with support/std_string.h,
[features.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 "support/std_ostream.h"
15
16 using std::auto_ptr;
17
18
19 MathLefteqnInset::MathLefteqnInset()
20         : MathNestInset(1)
21 {}
22
23
24 auto_ptr<InsetBase> MathLefteqnInset::clone() const
25 {
26         return auto_ptr<InsetBase>(new MathLefteqnInset(*this));
27 }
28
29
30 void MathLefteqnInset::metrics(MetricsInfo & mi, Dimension & dim) const
31 {
32         cell(0).metrics(mi);
33         dim_.asc = cell(0).ascent() + 2;
34         dim_.des = cell(0).descent() + 2;
35         dim_.wid = 4;
36         metricsMarkers();
37         dim = dim_;
38 }
39
40
41 void MathLefteqnInset::draw(PainterInfo & pi, int x, int y) const
42 {
43         cell(0).draw(pi, x + 2, y);
44         drawMarkers(pi, x, y);
45 }
46
47
48 string MathLefteqnInset::name() const
49 {
50         return "lefteqn";
51 }
52
53
54 void MathLefteqnInset::infoize(std::ostream & os) const
55 {
56         os << "Lefteqn ";
57 }