3 * \file InsetMathSpecialChar.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Enrico Forestieri
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_SPECIALCHARINSET_H
13 #define MATH_SPECIALCHARINSET_H
15 #include "InsetMath.h"
17 #include "support/docstring.h"
21 /// The special character inset.
22 class InsetMathSpecialChar : public InsetMath
26 explicit InsetMathSpecialChar(docstring const & name);
28 void metrics(MetricsInfo & mi, Dimension & dim) const override;
30 void draw(PainterInfo & pi, int x, int y) const override;
32 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
34 void drawT(TextPainter &, int x, int y) const override;
36 int kerning(BufferView const *) const override { return kerning_; }
38 void write(TeXMathStream & os) const override;
40 void validate(LaTeXFeatures & features) const override;
42 void normalize(NormalStream & ns) const override;
44 void octave(OctaveStream & os) const override;
46 void maple(MapleStream &) const override;
48 void mathematica(MathematicaStream &) const override;
50 void mathmlize(MathMLStream & ms) const override;
52 void htmlize(HtmlStream & ms) const override;
53 /// identifies SpecialChar insets
54 InsetMathSpecialChar const * asSpecialCharInset() const override { return this; }
56 docstring name() const override { return name_; }
58 char_type getChar() const override { return char_; }
60 InsetCode lyxCode() const override { return MATH_SPECIALCHAR_CODE; }
63 Inset * clone() const override;
66 /// the displayed character
68 /// cached kerning for superscript
74 #endif // MATH_SPECIALCHARINSET_H