]> git.lyx.org Git - lyx.git/blob - src/mathed/math_ertinset.C
fix #1073
[lyx.git] / src / mathed / math_ertinset.C
1
2 #include <config.h>
3
4 #include "math_ertinset.h"
5 #include "math_mathmlstream.h"
6 #include "support/LOstream.h"
7
8
9 MathInset * MathErtInset::clone() const
10 {
11         return new MathErtInset(*this);
12 }
13
14
15 void MathErtInset::metrics(MetricsInfo & mi) const
16 {
17         FontSetChanger dummy(mi.base, "lyxert");
18         MathTextInset::metrics(mi);
19         cache_.colinfo_[0].align_ = 'l';
20         metricsMarkers2();
21 }
22
23
24 void MathErtInset::draw(PainterInfo & pi, int x, int y) const
25 {
26         FontSetChanger dummy(pi.base, "lyxert");
27         MathTextInset::draw(pi, x + 1, y);
28         drawMarkers2(pi, x, y);
29 }
30
31
32 void MathErtInset::write(WriteStream & os) const
33 {
34         if (os.latex())
35                 os << cell(0);
36         else
37                 os << "\\lyxert{" << cell(0) << '}';
38 }
39
40
41 void MathErtInset::infoize(std::ostream & os) const
42 {
43         os << "Box: Ert";
44 }