]> git.lyx.org Git - lyx.git/blob - src/mathed/math_charinset.h
small up/down tweaking
[lyx.git] / src / mathed / math_charinset.h
1 // -*- C++ -*-
2 #ifndef MATH_CHARINSET_H
3 #define MATH_CHARINSET_H
4
5 #include "math_diminset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** The base character inset.
12  *  \author André Pönitz
13  *
14  * Full author contact details are available in file CREDITS
15  */
16
17 class MathCharInset : public MathDimInset {
18 public:
19         ///
20         explicit MathCharInset(char c);
21         ///
22         MathInset * clone() const;
23         ///
24         void metrics(MathMetricsInfo & st) const;
25         ///
26         void draw(MathPainterInfo &, int x, int y) const;
27         ///
28         void metricsT(TextMetricsInfo const & st) const;
29         ///
30         void drawT(TextPainter &, int x, int y) const;
31         ///
32         void write(WriteStream & os) const;
33         ///
34         void normalize(NormalStream & ns) const;
35         ///
36         void octavize(OctaveStream & os) const;
37         /// identifies Charinsets
38         MathCharInset const * asCharInset() const { return this; }
39         ///
40         char getChar() const { return char_; }
41         ///
42         bool isRelOp() const;
43         ///
44         bool match(MathInset const *) const;
45
46 private:
47         /// the character
48         char char_;
49 };
50 #endif