]> git.lyx.org Git - lyx.git/blob - src/mathed/math_exfuncinset.C
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_exfuncinset.C
1 #include <config.h>
2
3 #include "math_exfuncinset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7
8
9 MathExFuncInset::MathExFuncInset(string const & name)
10         : MathNestInset(1), name_(name)
11 {}
12
13
14 MathInset * MathExFuncInset::clone() const
15 {
16         return new MathExFuncInset(*this);
17 }
18
19
20 void MathExFuncInset::metrics(MathMetricsInfo const & mi) const
21 {
22         whichFont(font_, LM_TC_TEXTRM, mi);
23         mathed_string_dim(font_, name_, ascent_, descent_, width_);
24 }
25
26
27 void MathExFuncInset::draw(Painter & pain, int x, int y) const
28 {
29         drawStr(pain, font_, x, y, name_);
30 }
31
32
33 void MathExFuncInset::normalize(NormalStream & os) const
34 {
35         os << '[' << name_ << ' ' << cell(0) << ']';
36 }
37
38
39 void MathExFuncInset::maplize(MapleStream & os) const
40 {
41         os << name_ << '(' << cell(0) << ')';
42 }
43
44
45 void MathExFuncInset::mathmlize(MathMLStream & os) const
46 {
47         os << MTag(name_.c_str()) << cell(0) << ETag(name_.c_str());
48 }
49
50
51 void MathExFuncInset::octavize(OctaveStream & os) const
52 {
53         os << name_ << '(' << cell(0) << ')';
54 }
55
56
57 void MathExFuncInset::write(WriteStream & os) const
58 {
59         os << '\\' << name_ << '{' << cell(0) << '}';
60 }