1 /**
2 * \file InsetMathLefteqn.cpp
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 "InsetMathLefteqn.h"
14
15 #include "support/docstream.h"
16
17
18 namespace lyx {
19
InsetMathLefteqn(Buffer * buf)20 InsetMathLefteqn::InsetMathLefteqn(Buffer * buf)
21 : InsetMathNest(buf, 1)
22 {}
23
24
clone() const25 Inset * InsetMathLefteqn::clone() const
26 {
27 return new InsetMathLefteqn(*this);
28 }
29
30
metrics(MetricsInfo & mi,Dimension & dim) const31 void InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const
32 {
33 cell(0).metrics(mi, dim);
34 dim.asc += 2;
35 dim.des += 2;
36 dim.wid = 4;
37 }
38
39
draw(PainterInfo & pi,int x,int y) const40 void InsetMathLefteqn::draw(PainterInfo & pi, int x, int y) const
41 {
42 cell(0).draw(pi, x + 1, y);
43 }
44
45
name() const46 docstring InsetMathLefteqn::name() const
47 {
48 return from_ascii("lefteqn");
49 }
50
51
infoize(odocstream & os) const52 void InsetMathLefteqn::infoize(odocstream & os) const
53 {
54 os << "Lefteqn ";
55 }
56
57
58 } // namespace lyx
59