3 #include "math_unknowninset.h"
4 #include "math_support.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
12 MathUnknownInset::MathUnknownInset(string const & nm, bool final, bool black)
13 : name_(nm), final_(final), black_(black)
17 auto_ptr<InsetBase> MathUnknownInset::clone() const
19 return auto_ptr<InsetBase>(new MathUnknownInset(*this));
23 string MathUnknownInset::name() const
29 void MathUnknownInset::setName(string const & name)
35 bool MathUnknownInset::match(MathAtom const & at) const
37 MathUnknownInset const * q = at->asUnknownInset();
38 return q && name_ == q->name_;
42 void MathUnknownInset::normalize(NormalStream & os) const
44 os << "[unknown " << name_ << ']';
48 void MathUnknownInset::metrics(MetricsInfo & mi, Dimension & dim) const
50 mathed_string_dim(mi.base.font, name_, dim);
54 void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const
57 drawStrBlack(pi, x, y, name_);
59 drawStrRed(pi, x, y, name_);
63 void MathUnknownInset::finalize()
69 bool MathUnknownInset::final() const
75 void MathUnknownInset::maple(MapleStream & os) const
80 void MathUnknownInset::mathematica(MathematicaStream & os) const
86 void MathUnknownInset::mathmlize(MathMLStream & os) const
88 os << MTag("mi") << name_ << ETag("mi");
92 void MathUnknownInset::octave(OctaveStream & os) const