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