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), kerning_(0),
31 docstring InsetMathUnknown::name() const
37 void InsetMathUnknown::setName(docstring const & name)
43 void InsetMathUnknown::normalize(NormalStream & os) const
45 os << "[unknown " << name_ << ']';
49 void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
51 metricsStrRedBlack(mi, dim, name_);
52 docstring::const_reverse_iterator rit = name_.rbegin();
53 kerning_ = mathed_char_kerning(mi.base.font, *rit);
57 void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
60 drawStrBlack(pi, x, y, name_);
62 drawStrRed(pi, x, y, name_);
66 void InsetMathUnknown::finalize()
72 bool InsetMathUnknown::final() const
78 void InsetMathUnknown::maple(MapleStream & os) const
84 void InsetMathUnknown::mathematica(MathematicaStream & os) const
90 void InsetMathUnknown::mathmlize(MathStream &) const
92 throw MathExportException();
96 void InsetMathUnknown::htmlize(HtmlStream &) const
98 throw MathExportException();
102 void InsetMathUnknown::octave(OctaveStream & os) const