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