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