4 #include "math_unknowninset.h"
5 #include "math_support.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
10 MathUnknownInset::MathUnknownInset(string const & nm, bool final, bool black)
11 : name_(nm), final_(final), black_(black)
15 MathInset * MathUnknownInset::clone() const
17 return new MathUnknownInset(*this);
21 string MathUnknownInset::name() const
27 void MathUnknownInset::setName(string const & name)
33 bool MathUnknownInset::match(MathAtom const & at) const
35 MathUnknownInset const * q = at->asUnknownInset();
36 return q && name_ == q->name_;
40 void MathUnknownInset::normalize(NormalStream & os) const
42 os << "[unknown " << name_ << ']';
46 void MathUnknownInset::metrics(MathMetricsInfo & mi) const
48 mathed_string_dim(mi.base.font, name_, dim_);
52 void MathUnknownInset::draw(MathPainterInfo & pi, int x, int y) const
55 drawStrBlack(pi, x, y, name_);
57 drawStrRed(pi, x, y, name_);
61 void MathUnknownInset::finalize()
67 bool MathUnknownInset::final() const
73 void MathUnknownInset::maple(MapleStream & os) const
78 void MathUnknownInset::mathematica(MathematicaStream & os) const
84 void MathUnknownInset::mathmlize(MathMLStream & os) const
86 os << MTag("mi") << name_ << ETag("mi");
90 void MathUnknownInset::octave(OctaveStream & os) const