3 #include "math_unknowninset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
9 MathUnknownInset::MathUnknownInset(string const & nm, bool final, bool black)
10 : name_(nm), final_(final), black_(black)
14 MathInset * MathUnknownInset::clone() const
16 return new MathUnknownInset(*this);
20 string MathUnknownInset::name() const
26 void MathUnknownInset::setName(string const & name)
32 bool MathUnknownInset::match(MathAtom const & at) const
34 MathUnknownInset const * q = at->asUnknownInset();
35 return q && name_ == q->name_;
39 void MathUnknownInset::normalize(NormalStream & os) const
41 os << "[unknown " << name_ << ']';
45 Dimension MathUnknownInset::metrics(MetricsInfo & mi) const
48 mathed_string_dim(mi.base.font, name_, dim);
53 void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const
56 drawStrBlack(pi, x, y, name_);
58 drawStrRed(pi, x, y, name_);
62 void MathUnknownInset::finalize()
68 bool MathUnknownInset::final() const
74 void MathUnknownInset::maple(MapleStream & os) const
79 void MathUnknownInset::mathematica(MathematicaStream & os) const
85 void MathUnknownInset::mathmlize(MathMLStream & os) const
87 os << MTag("mi") << name_ << ETag("mi");
91 void MathUnknownInset::octave(OctaveStream & os) const