]> git.lyx.org Git - lyx.git/blob - src/mathed/math_charinset.h
718faab5b5c030a97f640015f6329e33aa3e08c0
[lyx.git] / src / mathed / math_charinset.h
1 // -*- C++ -*-
2 #ifndef MATH_CHARINSET_H
3 #define MATH_CHARINSET_H
4
5 #include "math_inset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** The base character inset.
12     \author André Pönitz
13  */
14
15 class MathCharInset : public MathInset {
16 public:
17         ///
18         MathCharInset(char c, MathTextCodes t);
19         ///
20         MathInset * clone() const;
21         ///
22         void draw(Painter &, int x, int baseline);
23         ///
24         void write(std::ostream &, bool fragile) const;
25         ///
26         void writeNormal(std::ostream &) const;
27         /// 
28         int ascent() const;
29         ///
30         int descent() const;
31         ///
32         int width() const;
33         /// identifies Charinsets
34         bool isCharInset() const { return true; }
35         ///
36         char getChar() const { return char_; }
37
38 private:
39         /// the character
40         char char_;
41 };
42 #endif