]> git.lyx.org Git - lyx.git/blob - src/mathed/math_ertinset.C
Make lyx2lyx output the new external inset format.
[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, Dimension & dim) const
16 {
17         FontSetChanger dummy(mi.base, "lyxert");
18         MathTextInset::metrics(mi, dim_);
19         cache_.colinfo_[0].align_ = 'l';
20         metricsMarkers();
21         dim = dim_;
22 }
23
24
25 void MathErtInset::draw(PainterInfo & pi, int x, int y) const
26 {
27         FontSetChanger dummy(pi.base, "lyxert");
28         MathTextInset::draw(pi, x + 1, y);
29         drawMarkers(pi, x, y);
30 }
31
32
33 void MathErtInset::write(WriteStream & os) const
34 {
35         if (os.latex())
36                 os << cell(0);
37         else
38                 os << "\\lyxert{" << cell(0) << '}';
39 }
40
41
42 void MathErtInset::infoize(std::ostream & os) const
43 {
44         os << "Box: Ert";
45 }