]> git.lyx.org Git - lyx.git/blob - src/mathed/math_numberinset.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_numberinset.C
1 #include <config.h>
2
3
4 #include "math_numberinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "math_support.h"
8 #include "debug.h"
9
10
11 MathNumberInset::MathNumberInset(string const & s)
12         : str_(s)
13 {}
14
15
16 MathInset * MathNumberInset::clone() const
17 {
18         return new MathNumberInset(*this);
19 }
20
21
22 void MathNumberInset::metrics(MathMetricsInfo & mi) const
23 {
24         mathed_string_dim(mi.base.font, str_, dim_);
25 }
26
27
28 void MathNumberInset::draw(MathPainterInfo & pi, int x, int y) const
29 {
30         //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
31         drawStr(pi, pi.base.font, x, y, str_);
32 }
33
34
35 void MathNumberInset::normalize(NormalStream & os) const
36 {
37         os << "[number " << str_ << ']';
38 }
39
40
41 void MathNumberInset::maple(MapleStream & os) const
42 {
43         os << str_;
44 }
45
46
47 void MathNumberInset::octave(OctaveStream & os) const
48 {
49         os << str_;
50 }
51
52
53 void MathNumberInset::mathmlize(MathMLStream & os) const
54 {
55         os << "<mi> " << str_ << " </mi>";
56 }
57
58
59 void MathNumberInset::write(WriteStream & os) const
60 {
61         os << str_;
62 }