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