2 * \file InsetMathUnknown.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathUnknown.h"
14 #include "MathSupport.h"
16 #include "MathStream.h"
17 #include "MathStream.h"
27 InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black)
28 : name_(nm), final_(final), black_(black)
32 auto_ptr<InsetBase> InsetMathUnknown::doClone() const
34 return auto_ptr<InsetBase>(new InsetMathUnknown(*this));
38 docstring InsetMathUnknown::name() const
44 void InsetMathUnknown::setName(docstring const & name)
50 void InsetMathUnknown::normalize(NormalStream & os) const
52 os << "[unknown " << name_ << ']';
56 bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
58 mathed_string_dim(mi.base.font, name_, dim);
59 docstring::const_reverse_iterator rit = name_.rbegin();
60 kerning_ = mathed_char_kerning(mi.base.font, *rit);
68 void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
71 drawStrBlack(pi, x, y, name_);
73 drawStrRed(pi, x, y, name_);
74 setPosCache(pi, x, y);
78 void InsetMathUnknown::finalize()
84 bool InsetMathUnknown::final() const
90 void InsetMathUnknown::maple(MapleStream & os) const
96 void InsetMathUnknown::mathematica(MathematicaStream & os) const
102 void InsetMathUnknown::mathmlize(MathStream & os) const
104 os << MTag("mi") << name_ << ETag("mi");
108 void InsetMathUnknown::octave(OctaveStream & os) const