]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathLim.cpp
Pick up some stitches dropped by Abdel ;-)
[lyx.git] / src / mathed / InsetMathLim.cpp
1 /**
2  * \file InsetMathLim.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "InsetMathLim.h"
14 #include "MathData.h"
15 #include "MathStream.h"
16 #include "debug.h"
17
18
19 namespace lyx {
20
21 using std::endl;
22
23
24 InsetMathLim::InsetMathLim
25         (MathData const & f, MathData const & x, MathData const & x0)
26         : InsetMathNest(3)
27 {
28         cell(0) = f;
29         cell(1) = x;
30         cell(2) = x0;
31 }
32
33
34 Inset * InsetMathLim::clone() const
35 {
36         return new InsetMathLim(*this);
37 }
38
39
40 void InsetMathLim::normalize(NormalStream & os) const
41 {
42         os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
43 }
44
45
46 bool InsetMathLim::metrics(MetricsInfo &, Dimension &) const
47 {
48         lyxerr << "should not happen" << endl;
49         return true;
50 }
51
52
53 void InsetMathLim::draw(PainterInfo &, int, int) const
54 {
55         lyxerr << "should not happen" << endl;
56 }
57
58
59 void InsetMathLim::maple(MapleStream & os) const
60 {
61         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
62 }
63
64
65 void InsetMathLim::maxima(MaximaStream & os) const
66 {
67         os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
68 }
69
70
71 void InsetMathLim::mathematica(MathematicaStream & os) const
72 {
73         os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
74 }
75
76
77 void InsetMathLim::mathmlize(MathStream & os) const
78 {
79         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
80 }
81
82
83 void InsetMathLim::write(WriteStream &) const
84 {
85         lyxerr << "should not happen" << endl;
86 }
87
88
89 } // namespace lyx