]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diffinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_diffinset.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_diffinset.h"
6 #include "math_support.h"
7 #include "math_mathmlstream.h"
8 #include "math_symbolinset.h"
9 #include "debug.h"
10
11
12 MathDiffInset::MathDiffInset()
13         : MathNestInset(1)
14 {}
15
16
17 MathInset * MathDiffInset::clone() const
18 {
19         return new MathDiffInset(*this);
20 }
21
22
23 void MathDiffInset::addDer(MathArray const & der)
24 {
25         cells_.push_back(der);
26 }
27
28
29 void MathDiffInset::normalize(NormalStream & os) const
30 {
31         os << "[diff";
32         for (idx_type idx = 0; idx < nargs(); ++idx)
33                 os << ' ' << cell(idx);
34         os << ']';
35 }
36
37
38 void MathDiffInset::metrics(MathMetricsInfo &) const
39 {
40         lyxerr << "should not happen\n";
41 }
42
43
44 void MathDiffInset::draw(MathPainterInfo &, int, int) const
45 {
46         lyxerr << "should not happen\n";
47 }
48
49
50 void MathDiffInset::maplize(MapleStream & os) const
51 {
52         os << "diff(";
53         for (idx_type idx = 0; idx < nargs(); ++idx) {
54                 if (idx != 0)
55                         os << ',';
56                 os << cell(idx);
57         }
58         os << ')';
59 }
60
61
62 void MathDiffInset::mathematicize(MathematicaStream & os) const
63 {
64         os << "Dt[";
65         for (idx_type idx = 0; idx < nargs(); ++idx) {
66                 if (idx != 0)
67                         os << ',';
68                 os << cell(idx);
69         }
70         os << ']';
71 }
72
73
74 void MathDiffInset::mathmlize(MathMLStream & os) const
75 {
76         os << "diff(";
77         for (idx_type idx = 0; idx < nargs(); ++idx) {
78                 if (idx != 0)
79                         os << ',';
80                 os << cell(idx);
81         }
82         os << ')';
83 }
84
85
86 void MathDiffInset::write(WriteStream &) const
87 {
88         lyxerr << "should not happen\n";
89 }