3 #include "math_exfuncinset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
9 MathExFuncInset::MathExFuncInset(string const & name)
10 : MathNestInset(1), name_(name)
14 MathInset * MathExFuncInset::clone() const
16 return new MathExFuncInset(*this);
20 void MathExFuncInset::metrics(MathMetricsInfo & mi) const
22 mathed_string_dim(mi.base.font, name_, ascent_, descent_, width_);
26 void MathExFuncInset::draw(MathPainterInfo & pi, int x, int y) const
28 drawStrBlack(pi, x, y, name_);
32 void MathExFuncInset::normalize(NormalStream & os) const
34 os << '[' << name_ << ' ' << cell(0) << ']';
38 void MathExFuncInset::maplize(MapleStream & os) const
40 os << name_ << '(' << cell(0) << ')';
44 void MathExFuncInset::mathmlize(MathMLStream & os) const
46 os << MTag(name_.c_str()) << cell(0) << ETag(name_.c_str());
50 void MathExFuncInset::octavize(OctaveStream & os) const
52 os << name_ << '(' << cell(0) << ')';
56 void MathExFuncInset::write(WriteStream & os) const
58 os << '\\' << name_ << '{' << cell(0) << '}';