]> git.lyx.org Git - lyx.git/blob - src/mathed/math_substackinset.C
split inset -> inset + updatableinset
[lyx.git] / src / mathed / math_substackinset.C
1 #include <config.h>
2
3
4 #include "math_substackinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7
8
9 MathSubstackInset::MathSubstackInset()
10         : MathGridInset(1, 1)
11 {}
12
13
14 MathInset * MathSubstackInset::clone() const
15 {
16         return new MathSubstackInset(*this);
17 }
18
19
20 void MathSubstackInset::metrics(MathMetricsInfo & mi) const
21 {
22         if (mi.base.style == LM_ST_DISPLAY) {
23                 MathStyleChanger dummy(mi.base, LM_ST_TEXT);
24                 MathGridInset::metrics(mi);
25         } else {
26                 MathGridInset::metrics(mi);
27         }
28 }
29
30
31 void MathSubstackInset::write(WriteStream & os) const
32 {
33         os << "\\substack{";
34         MathGridInset::write(os);
35         os << "}\n";
36 }
37
38
39 void MathSubstackInset::normalize(NormalStream & os) const
40 {
41         os << "[substack ";
42         MathGridInset::normalize(os);
43         os << ']';
44 }
45
46
47 void MathSubstackInset::maple(MapleStream & os) const
48 {
49         os << "substack(";
50         MathGridInset::maple(os);
51         os << ')';
52 }