]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathClass.cpp
Merge branch 'master' into biblatex2
[lyx.git] / src / mathed / InsetMathClass.cpp
1 /**
2  * \file InsetMathClass.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 "InsetMathClass.h"
14
15 #include "support/docstream.h"
16
17
18 namespace lyx {
19
20 InsetMathClass::InsetMathClass(Buffer * buf, MathClass mc)
21         : InsetMathNest(buf, 1), math_class_(mc)
22 {}
23
24
25 Inset * InsetMathClass::clone() const
26 {
27         return new InsetMathClass(*this);
28 }
29
30
31 void InsetMathClass::metrics(MetricsInfo & mi, Dimension & dim) const
32 {
33         cell(0).metrics(mi, dim);
34 }
35
36
37 void InsetMathClass::draw(PainterInfo & pi, int x, int y) const
38 {
39         cell(0).draw(pi, x, y);
40 }
41
42
43 docstring InsetMathClass::name() const
44 {
45         return class_to_string(math_class_);
46 }
47
48
49 void InsetMathClass::infoize(odocstream & os) const
50 {
51         os << name() << " ";
52 }
53
54
55 } // namespace lyx