7 #include "math_funcinset.h"
10 #include "math_support.h"
11 #include "math_mathmlstream.h"
12 #include "math_streamstr.h"
15 extern LyXFont WhichFont(short type, int size);
18 MathFuncInset::MathFuncInset(string const & nm)
23 MathInset * MathFuncInset::clone() const
25 return new MathFuncInset(*this);
29 string const & MathFuncInset::name() const
35 void MathFuncInset::setName(string const & n)
41 void MathFuncInset::metrics(MathMetricsInfo const & mi) const
43 whichFont(font_, LM_TC_TEXTRM, mi);
44 mathed_string_dim(font_, name_, ascent_, descent_, width_);
48 void MathFuncInset::draw(Painter & pain, int x, int y) const
50 drawStr(pain, font_, x, y, name_);
54 bool MathFuncInset::match(MathInset * p) const
56 MathFuncInset const * q = p->asFuncInset();
57 return q && name_ == q->name_;
61 void MathFuncInset::maplize(MapleStream & os) const
67 void MathFuncInset::mathmlize(MathMLStream & os) const
69 os << MTag("mi") << name_ << ETag("mi");
73 void MathFuncInset::octavize(OctaveStream & os) const
79 void MathFuncInset::normalize(NormalStream & os) const
81 os << "[func " << name_ << ']';
85 void MathFuncInset::write(WriteStream & os) const
87 os << "\\" << name_ << ' ';