7 #include "math_unknowninset.h"
9 #include "frontends/Painter.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 MathUnknownInset::MathUnknownInset(string const & nm)
23 MathInset * MathUnknownInset::clone() const
25 return new MathUnknownInset(*this);
29 string const & MathUnknownInset::name() const
35 void MathUnknownInset::setName(string const & n)
41 bool MathUnknownInset::match(MathInset * p) const
43 MathUnknownInset const * q = p->asUnknownInset();
44 return q && name_ == q->name_;
48 void MathUnknownInset::write(WriteStream & os) const
50 os << "\\" << name_ << ' ';
54 void MathUnknownInset::normalize(NormalStream & os) const
56 os << "[unknown " << name_ << ']';
60 void MathUnknownInset::metrics(MathMetricsInfo const & mi) const
62 whichFont(font_, LM_TC_TEX, mi);
63 mathed_string_dim(font_, name_, ascent_, descent_, width_);
67 void MathUnknownInset::draw(Painter & pain, int x, int y) const
69 drawStr(pain, font_, x, y, name_);
73 void MathUnknownInset::maplize(MapleStream & os) const
79 void MathUnknownInset::mathmlize(MathMLStream & os) const
81 os << MTag("mi") << name_ << ETag("mi");
85 void MathUnknownInset::octavize(OctaveStream & os) const