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"
19 /// The special character inset.
20 class InsetMathSpecialChar
: public InsetMath
24 explicit InsetMathSpecialChar(docstring
const & name
);
26 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
28 void draw(PainterInfo
& pi
, int x
, int y
) const;
30 void metricsT(TextMetricsInfo
const & mi
, Dimension
& dim
) const;
32 void drawT(TextPainter
&, int x
, int y
) const;
34 int kerning(BufferView
const *) const { return kerning_
; }
36 void write(WriteStream
& os
) const;
38 void validate(LaTeXFeatures
& features
) const;
40 void normalize(NormalStream
& ns
) const;
42 void octave(OctaveStream
& os
) const;
44 void maple(MapleStream
&) const;
46 void mathematica(MathematicaStream
&) const;
48 void mathmlize(MathStream
& ms
) const;
49 /// identifies SpecialChar insets
50 InsetMathSpecialChar
const * asSpecialCharInset() const { return this; }
52 docstring
name() const { return name_
; }
54 char_type
getChar() const { return char_
; }
56 InsetCode
lyxCode() const { return MATH_SPECIALCHAR_CODE
; }
59 virtual Inset
* clone() const;
62 /// the displayed character
64 /// cached kerning for superscript
70 #endif // MATH_SPECIALCHARINSET_H