]> git.lyx.org Git - lyx.git/blob - src/mathed/math_charinset.h
remove cursor::drawSelection() plus some math reorganization (move the
[lyx.git] / src / mathed / math_charinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_charinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_CHARINSET_H
13 #define MATH_CHARINSET_H
14
15 #include "math_diminset.h"
16
17 #warning this should not derive from the fat MathDimInset
18
19 /// The base character inset.
20 class MathCharInset : public MathDimInset {
21 public:
22         ///
23         explicit MathCharInset(char c);
24         ///
25         virtual std::auto_ptr<InsetBase> clone() const;
26         ///
27         void metrics(MetricsInfo & mi, Dimension & dim) const;
28         ///
29         void draw(PainterInfo & pi, int x, int y) const;
30         ///
31         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
32         ///
33         void drawT(TextPainter &, int x, int y) const;
34
35         ///
36         void write(WriteStream & os) const;
37         ///
38         void normalize(NormalStream & ns) const;
39         ///
40         void octave(OctaveStream & os) const;
41         /// identifies Charinsets
42         MathCharInset const * asCharInset() const { return this; }
43         ///
44         char getChar() const { return char_; }
45         ///
46         bool isRelOp() const;
47
48 private:
49         /// the character
50         char char_;
51 };
52 #endif