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