]> git.lyx.org Git - lyx.git/blob - src/mathed/math_envinset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_envinset.C
1 #include <config.h>
2
3
4 #include "math_envinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "support/LOstream.h"
8
9
10 MathEnvInset::MathEnvInset(string const & name)
11         : MathNestInset(1), name_(name)
12 {}
13
14
15 MathInset * MathEnvInset::clone() const
16 {
17         return new MathEnvInset(*this);
18 }
19
20
21 void MathEnvInset::metrics(MathMetricsInfo & mi) const
22 {
23         dim_ = cell(0).metrics(mi);
24         metricsMarkers2();
25 }
26
27
28 void MathEnvInset::draw(MathPainterInfo & pi, int x, int y) const
29 {
30         cell(0).draw(pi, x + 1, y);
31         drawMarkers2(pi, x, y);
32 }
33
34
35 void MathEnvInset::write(WriteStream & os) const
36 {
37         os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
38 }
39
40
41 void MathEnvInset::normalize(NormalStream & os) const
42 {
43         os << "[env " << name_ << ' ' << cell(0) << ']';
44 }
45
46
47 void MathEnvInset::infoize(std::ostream & os) const
48 {
49         os << "Env: " << name_;
50 }