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