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