A bit more re-organization.
[lyx.git] / src / mathed / InsetMathChar.h
blob6dba328c4e3deac9c4aec64a589ad29c72840447
1 // -*- C++ -*-
2 /**
3 * \file InsetMathChar.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_CHARINSET_H
13 #define MATH_CHARINSET_H
15 #include "InsetMath.h"
17 namespace lyx {
19 /// The base character inset.
20 class InsetMathChar : public InsetMath {
21 public:
22 ///
23 explicit InsetMathChar(char_type c);
24 ///
25 void metrics(MetricsInfo & mi, Dimension & dim) const;
26 ///
27 void draw(PainterInfo & pi, int x, int y) const;
28 ///
29 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
30 ///
31 void drawT(TextPainter &, int x, int y) const;
32 ///
33 int kerning(BufferView const *) const { return kerning_; }
35 ///
36 void write(WriteStream & os) const;
37 ///
38 void validate(LaTeXFeatures & features) const;
39 ///
40 void normalize(NormalStream & ns) const;
41 ///
42 void octave(OctaveStream & os) const;
43 ///
44 void mathmlize(MathStream & ms) const;
45 /// identifies Charinsets
46 InsetMathChar const * asCharInset() const { return this; }
47 ///
48 char_type getChar() const { return char_; }
49 ///
50 bool isRelOp() const;
51 ///
52 InsetCode lyxCode() const { return MATH_CHAR_CODE; }
54 private:
55 virtual Inset * clone() const;
56 /// the character
57 char_type char_;
58 /// cached kerning for superscript
59 mutable int kerning_;
62 } // namespace lyx
64 #endif