7 #include "math_unknowninset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
13 MathUnknownInset::MathUnknownInset(string const & nm, bool final, bool black)
14 : name_(nm), final_(final), black_(black)
18 MathInset * MathUnknownInset::clone() const
20 return new MathUnknownInset(*this);
24 string const & MathUnknownInset::name() const
30 string & MathUnknownInset::name()
36 bool MathUnknownInset::match(MathInset * p) const
38 MathUnknownInset const * q = p->asUnknownInset();
39 return q && name_ == q->name_;
43 void MathUnknownInset::write(WriteStream & os) const
45 os << "\\" << name_ << ' ';
49 void MathUnknownInset::normalize(NormalStream & os) const
51 os << "[unknown " << name_ << ']';
55 void MathUnknownInset::metrics(MathMetricsInfo & mi) const
57 mathed_string_dim(mi.base.font, name_, dim_);
61 void MathUnknownInset::draw(MathPainterInfo & pi, int x, int y) const
64 drawStrBlack(pi, x, y, name_);
66 drawStrRed(pi, x, y, name_);
70 void MathUnknownInset::finalize()
76 bool MathUnknownInset::final() const
82 void MathUnknownInset::maplize(MapleStream & os) const
87 void MathUnknownInset::mathematicize(MathematicaStream & os) const
93 void MathUnknownInset::mathmlize(MathMLStream & os) const
95 os << MTag("mi") << name_ << ETag("mi");
99 void MathUnknownInset::octavize(OctaveStream & os) const