]> git.lyx.org Git - lyx.git/blob - src/mathed/math_exfuncinset.C
forgotten file math_extern[Ch]
[lyx.git] / src / mathed / math_exfuncinset.C
1 #include "math_exfuncinset.h"
2 #include "math_support.h"
3 #include "math_mathmlstream.h"
4
5
6 using std::ostream;
7
8
9 MathExFuncInset::MathExFuncInset(string const & name, MathArray const & arg)
10         : MathNestInset(1), name_(name)
11 {
12         cell(0) = arg;
13 }
14
15
16 MathInset * MathExFuncInset::clone() const
17 {
18         return new MathExFuncInset(*this);
19 }
20
21
22 void MathExFuncInset::write(WriteStream & os) const
23 {
24         os << '\\' << name_.c_str() << '{' << cell(0) << '}';
25 }
26
27
28 void MathExFuncInset::normalize(NormalStream & os) const
29 {
30         os << '[' << name_.c_str() << ' ' << cell(0) << ']';
31 }
32
33
34 void MathExFuncInset::metrics(MathMetricsInfo const & mi) const
35 {
36         mi_ = mi;
37         mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
38 }
39
40
41 void MathExFuncInset::draw(Painter & pain, int x, int y) const
42 {  
43         drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
44 }
45
46
47 void MathExFuncInset::octavize(OctaveStream & os) const
48 {
49         os << name_.c_str() << '(' << cell(0) << ')';
50 }