]> git.lyx.org Git - lyx.git/blob - src/mathed/math_numberinset.C
Standardise the header blurb in mathed.
[lyx.git] / src / mathed / math_numberinset.C
1 /**
2  * \file math_numberinset.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 "math_numberinset.h"
14 #include "math_mathmlstream.h"
15 #include "math_streamstr.h"
16 #include "math_support.h"
17 #include "debug.h"
18
19 using std::auto_ptr;
20
21
22 MathNumberInset::MathNumberInset(string const & s)
23         : str_(s)
24 {}
25
26
27 auto_ptr<InsetBase> MathNumberInset::clone() const
28 {
29         return auto_ptr<InsetBase>(new MathNumberInset(*this));
30 }
31
32
33 void MathNumberInset::metrics(MetricsInfo & mi, Dimension & dim) const
34 {
35         mathed_string_dim(mi.base.font, str_, dim);
36 }
37
38
39 void MathNumberInset::draw(PainterInfo & pi, int x, int y) const
40 {
41         //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
42         drawStr(pi, pi.base.font, x, y, str_);
43 }
44
45
46 void MathNumberInset::normalize(NormalStream & os) const
47 {
48         os << "[number " << str_ << ']';
49 }
50
51
52 void MathNumberInset::maple(MapleStream & os) const
53 {
54         os << str_;
55 }
56
57
58 void MathNumberInset::octave(OctaveStream & os) const
59 {
60         os << str_;
61 }
62
63
64 void MathNumberInset::mathmlize(MathMLStream & os) const
65 {
66         os << "<mi> " << str_ << " </mi>";
67 }
68
69
70 void MathNumberInset::write(WriteStream & os) const
71 {
72         os << str_;
73 }