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"
15 #include "MathSupport.h"
17 #include "MathStream.h"
19 #include "MetricsInfo.h"
21 #include "frontends/Painter.h"
26 InsetMathUnknown::InsetMathUnknown(docstring const & nm,
27 docstring const & selection, bool final, bool black)
28 : name_(nm), final_(final), black_(black), kerning_(0),
33 docstring InsetMathUnknown::name() const
39 void InsetMathUnknown::setName(docstring const & name)
45 void InsetMathUnknown::normalize(NormalStream & os) const
47 os << "[unknown " << name_ << ']';
51 void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
53 metricsStrRedBlack(mi, dim, name_);
54 docstring::const_reverse_iterator rit = name_.rbegin();
55 kerning_ = mathed_char_kerning(mi.base.font, *rit);
59 void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
62 drawStrBlack(pi, x, y, name_);
64 drawStrRed(pi, x, y, name_);
68 void InsetMathUnknown::finalize()
74 bool InsetMathUnknown::final() const
80 void InsetMathUnknown::maple(MapleStream & os) const
86 void InsetMathUnknown::mathematica(MathematicaStream & os) const
92 void InsetMathUnknown::mathmlize(MathStream &) const
94 throw MathExportException();
98 void InsetMathUnknown::htmlize(HtmlStream &) const
100 throw MathExportException();
104 void InsetMathUnknown::octave(OctaveStream & os) const