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"
19 #include "frontends/Painter.h"
24 InsetMathUnknown::InsetMathUnknown(docstring const & nm,
25 docstring const & selection, bool final, bool black)
26 : name_(nm), final_(final), black_(black), selection_(selection)
30 Inset * InsetMathUnknown::clone() const
32 return new InsetMathUnknown(*this);
36 docstring InsetMathUnknown::name() const
42 void InsetMathUnknown::setName(docstring const & name)
48 void InsetMathUnknown::normalize(NormalStream & os) const
50 os << "[unknown " << name_ << ']';
54 void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
56 mathed_string_dim(mi.base.font, name_, dim);
57 docstring::const_reverse_iterator rit = name_.rbegin();
58 kerning_ = mathed_char_kerning(mi.base.font, *rit);
62 void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
65 drawStrBlack(pi, x, y, name_);
67 drawStrRed(pi, x, y, name_);
71 void InsetMathUnknown::finalize()
77 bool InsetMathUnknown::final() const
83 void InsetMathUnknown::maple(MapleStream & os) const
89 void InsetMathUnknown::mathematica(MathematicaStream & os) const
95 void InsetMathUnknown::mathmlize(MathStream & os) const
97 os << MTag("mi") << name_ << ETag("mi");
101 void InsetMathUnknown::octave(OctaveStream & os) const