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"
20 /// The base character inset.
21 class InsetMathChar : public InsetMath {
24 explicit InsetMathChar(char_type c);
26 bool 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 width() const { return width_; }
37 void write(WriteStream & os) const;
39 void normalize(NormalStream & ns) const;
41 void octave(OctaveStream & os) const;
43 void mathmlize(MathStream & ms) const;
44 /// identifies Charinsets
45 InsetMathChar const * asCharInset() const { return this; }
47 char_type getChar() const { return char_; }
52 virtual std::auto_ptr<InsetBase> doClone() const;