5 #include "math_funcinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
13 extern LyXFont WhichFont(short type, int size);
16 MathFuncInset::MathFuncInset(string const & nm)
21 MathInset * MathFuncInset::clone() const
23 return new MathFuncInset(*this);
27 string const & MathFuncInset::name() const
33 void MathFuncInset::setName(string const & n)
39 void MathFuncInset::metrics(MathMetricsInfo const & mi) const
42 mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
46 void MathFuncInset::draw(Painter & pain, int x, int y) const
48 drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
52 bool MathFuncInset::match(MathInset * p) const
54 MathFuncInset const * q = p->asFuncInset();
55 return q && name_ == q->name_;
59 void MathFuncInset::maplize(MapleStream & os) const
61 os << ' ' << name_.c_str();
65 void MathFuncInset::mathmlize(MathMLStream & os) const
67 os << MTag("mi") << name_.c_str() << ETag("mi");
71 void MathFuncInset::octavize(OctaveStream & os) const
73 os << ' ' << name_.c_str();
77 void MathFuncInset::normalize(NormalStream & os) const
79 os << "[func " << name_.c_str() << ']';
83 void MathFuncInset::write(WriteStream & os) const
85 os << "\\" << name_.c_str() << ' ';