]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathLim.cpp
89d580954e75b02ae66c925035b74d0fe22c1e89
[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 InsetMathLim::InsetMathLim
22         (MathData const & f, MathData const & x, MathData const & x0)
23         : InsetMathNest(3)
24 {
25         cell(0) = f;
26         cell(1) = x;
27         cell(2) = x0;
28 }
29
30
31 Inset * InsetMathLim::clone() const
32 {
33         return new InsetMathLim(*this);
34 }
35
36
37 void InsetMathLim::normalize(NormalStream & os) const
38 {
39         os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
40 }
41
42
43 void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
44 {
45         LYXERR0("should not happen");
46 }
47
48
49 void InsetMathLim::draw(PainterInfo &, int, int) const
50 {
51         LYXERR0("should not happen");
52 }
53
54
55 void InsetMathLim::maple(MapleStream & os) const
56 {
57         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
58 }
59
60
61 void InsetMathLim::maxima(MaximaStream & os) const
62 {
63         os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
64 }
65
66
67 void InsetMathLim::mathematica(MathematicaStream & os) const
68 {
69         os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
70 }
71
72
73 void InsetMathLim::mathmlize(MathStream & os) const
74 {
75         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
76 }
77
78
79 void InsetMathLim::write(WriteStream &) const
80 {
81         LYXERR0("should not happen");
82 }
83
84
85 } // namespace lyx