7 #include "math_unknowninset.h"
8 #include "frontends/Painter.h"
9 #include "math_support.h"
10 #include "math_mathmlstream.h"
11 #include "math_streamstr.h"
14 extern LyXFont WhichFont(short type, int size);
17 MathUnknownInset::MathUnknownInset(string const & nm)
22 MathInset * MathUnknownInset::clone() const
24 return new MathUnknownInset(*this);
28 string const & MathUnknownInset::name() const
34 void MathUnknownInset::setName(string const & n)
40 bool MathUnknownInset::match(MathInset * p) const
42 MathUnknownInset const * q = p->asUnknownInset();
43 return q && name_ == q->name_;
47 void MathUnknownInset::write(WriteStream & os) const
49 os << "\\" << name_ << ' ';
53 void MathUnknownInset::normalize(NormalStream & os) const
55 os << "[unknown " << name_ << ']';
59 void MathUnknownInset::metrics(MathMetricsInfo const & mi) const
61 whichFont(font_, LM_TC_TEX, mi);
62 mathed_string_dim(font_, name_, ascent_, descent_, width_);
66 void MathUnknownInset::draw(Painter & pain, int x, int y) const
68 drawStr(pain, font_, x, y, name_);
72 void MathUnknownInset::maplize(MapleStream & os) const
78 void MathUnknownInset::mathmlize(MathMLStream & os) const
80 os << MTag("mi") << name_ << ETag("mi");
84 void MathUnknownInset::octavize(OctaveStream & os) const