]> git.lyx.org Git - lyx.git/blob - src/mathed/math_unknowninset.C
forgotten file math_extern[Ch]
[lyx.git] / src / mathed / math_unknowninset.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_unknowninset.h"
6 #include "font.h"
7 #include "Painter.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10
11
12
13 extern LyXFont WhichFont(short type, int size);
14
15
16 MathUnknownInset::MathUnknownInset(string const & nm)
17         : name_(nm)
18 {}
19
20
21 MathInset * MathUnknownInset::clone() const
22 {
23         return new MathUnknownInset(*this);
24 }
25
26
27 string const & MathUnknownInset::name() const
28 {
29         return name_;
30 }
31
32
33 void MathUnknownInset::setName(string const & n)
34 {
35         name_ = n;
36 }
37
38
39 void MathUnknownInset::write(WriteStream & os) const
40 {
41         os << "\\" << name_.c_str() << ' ';
42 }
43
44
45 void MathUnknownInset::normalize(NormalStream & os) const
46 {
47         os << "[func " << name_.c_str() << ']';
48 }
49
50
51 void MathUnknownInset::metrics(MathMetricsInfo const & mi) const 
52 {
53         mi_ = mi;
54         mathed_string_dim(LM_TC_TEX, mi_, name_, ascent_, descent_, width_);
55 }
56
57
58 void MathUnknownInset::draw(Painter & pain, int x, int y) const
59
60         drawStr(pain, LM_TC_TEX, mi_, x, y, name_);
61 }
62
63
64 void MathUnknownInset::maplize(MapleStream & os) const
65 {
66         os << name_.c_str();
67 }
68
69
70 void MathUnknownInset::mathmlize(MathMLStream & os) const
71 {
72         os << MTag("mi") << name_.c_str() << ETag("mi");
73 }
74
75
76 void MathUnknownInset::octavize(OctaveStream & os) const
77 {
78         os << name_.c_str();
79 }