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 docstring
InsetMathUnknown::name() const
36 void InsetMathUnknown::setName(docstring
const & name
)
42 void InsetMathUnknown::normalize(NormalStream
& os
) const
44 os
<< "[unknown " << name_
<< ']';
48 void InsetMathUnknown::metrics(MetricsInfo
& mi
, Dimension
& dim
) const
50 mathed_string_dim(mi
.base
.font
, name_
, dim
);
51 docstring::const_reverse_iterator rit
= name_
.rbegin();
52 kerning_
= mathed_char_kerning(mi
.base
.font
, *rit
);
56 void InsetMathUnknown::draw(PainterInfo
& pi
, int x
, int y
) const
59 drawStrBlack(pi
, x
, y
, name_
);
61 drawStrRed(pi
, x
, y
, name_
);
65 void InsetMathUnknown::finalize()
71 bool InsetMathUnknown::final() const
77 void InsetMathUnknown::maple(MapleStream
& os
) const
83 void InsetMathUnknown::mathematica(MathematicaStream
& os
) const
89 void InsetMathUnknown::mathmlize(MathStream
& os
) const
91 os
<< MTag("mi") << name_
<< ETag("mi");
95 void InsetMathUnknown::octave(OctaveStream
& os
) const