3 * \file InsetMathChar.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_CHARINSET_H
13 #define MATH_CHARINSET_H
15 #include "InsetMath.h"
21 /// The base character inset.
22 class InsetMathChar : public InsetMath {
25 explicit InsetMathChar(char_type c);
27 void metrics(MetricsInfo & mi, Dimension & dim) const;
29 Dimension const dimension(BufferView const &) const { return dim_; }
31 void draw(PainterInfo & pi, int x, int y) const;
33 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
35 void drawT(TextPainter &, int x, int y) const;
37 int kerning() const { return kerning_; }
40 void write(WriteStream & os) const;
42 void normalize(NormalStream & ns) const;
44 void octave(OctaveStream & os) const;
46 void mathmlize(MathStream & ms) const;
47 /// identifies Charinsets
48 InsetMathChar const * asCharInset() const { return this; }
50 char_type getChar() const { return char_; }
55 virtual Inset * clone() const;
58 /// cached kerning for superscript
60 /// FIXME: move this out to BufferView
61 mutable Dimension dim_;