]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathLim.cpp
adjust
[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 void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
47 {
48         lyxerr << "should not happen" << endl;
49 }
50
51
52 void InsetMathLim::draw(PainterInfo &, int, int) const
53 {
54         lyxerr << "should not happen" << endl;
55 }
56
57
58 void InsetMathLim::maple(MapleStream & os) const
59 {
60         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
61 }
62
63
64 void InsetMathLim::maxima(MaximaStream & os) const
65 {
66         os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
67 }
68
69
70 void InsetMathLim::mathematica(MathematicaStream & os) const
71 {
72         os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
73 }
74
75
76 void InsetMathLim::mathmlize(MathStream & os) const
77 {
78         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
79 }
80
81
82 void InsetMathLim::write(WriteStream &) const
83 {
84         lyxerr << "should not happen" << endl;
85 }
86
87
88 } // namespace lyx