]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathNumber.C
make it compile again (hopefully)
[lyx.git] / src / mathed / InsetMathNumber.C
1 /**
2  * \file InsetMathNumber.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 "InsetMathNumber.h"
14 #include "MathMLStream.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
17
18 using lyx::docstring;
19
20 using std::string;
21 using std::auto_ptr;
22
23
24 InsetMathNumber::InsetMathNumber(string const & s)
25         : str_(s)
26 {}
27
28
29 auto_ptr<InsetBase> InsetMathNumber::doClone() const
30 {
31         return auto_ptr<InsetBase>(new InsetMathNumber(*this));
32 }
33
34
35 void InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const
36 {
37         // FIXME UNICODE
38         mathed_string_dim(mi.base.font, lyx::from_utf8(str_), dim);
39 }
40
41
42 void InsetMathNumber::draw(PainterInfo & pi, int x, int y) const
43 {
44         // FIXME UNICODE
45         pi.draw(x, y, lyx::from_utf8(str_));
46 }
47
48
49 void InsetMathNumber::normalize(NormalStream & os) const
50 {
51         os << "[number " << str_ << ']';
52 }
53
54
55 void InsetMathNumber::maple(MapleStream & os) const
56 {
57         os << str_;
58 }
59
60
61 void InsetMathNumber::mathematica(MathematicaStream & os) const
62 {
63         os << str_;
64 }
65
66
67 void InsetMathNumber::octave(OctaveStream & os) const
68 {
69         os << str_;
70 }
71
72
73 void InsetMathNumber::mathmlize(MathMLStream & os) const
74 {
75         os << "<mi> " << str_ << " </mi>";
76 }
77
78
79 void InsetMathNumber::write(WriteStream & os) const
80 {
81         os << str_;
82 }