]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathLim.C
rename mathed/math_xinset into mathed/InsetMathX
[lyx.git] / src / mathed / InsetMathLim.C
1 /**
2  * \file InsetMathLim.C
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 "MathMLStream.h"
16 #include "debug.h"
17
18 using std::auto_ptr;
19 using std::endl;
20
21
22 InsetMathLim::InsetMathLim
23         (MathArray const & f, MathArray const & x, MathArray const & x0)
24         : InsetMathNest(3)
25 {
26         cell(0) = f;
27         cell(1) = x;
28         cell(2) = x0;
29 }
30
31
32 auto_ptr<InsetBase> InsetMathLim::doClone() const
33 {
34         return auto_ptr<InsetBase>(new InsetMathLim(*this));
35 }
36
37
38 void InsetMathLim::normalize(NormalStream & os) const
39 {
40         os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
41 }
42
43
44 void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
45 {
46         lyxerr << "should not happen" << endl;
47 }
48
49
50 void InsetMathLim::draw(PainterInfo &, int, int) const
51 {
52         lyxerr << "should not happen" << endl;
53 }
54
55
56 void InsetMathLim::maple(MapleStream & os) const
57 {
58         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
59 }
60
61
62 void InsetMathLim::maxima(MaximaStream & os) const
63 {
64         os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
65 }
66
67
68 void InsetMathLim::mathematica(MathematicaStream & os) const
69 {
70         os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
71 }
72
73
74 void InsetMathLim::mathmlize(MathMLStream & os) const
75 {
76         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
77 }
78
79
80 void InsetMathLim::write(WriteStream &) const
81 {
82         lyxerr << "should not happen" << endl;
83 }