]> git.lyx.org Git - lyx.git/blob - src/mathed/math_charinset.h
cosmetics
[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 metrics(MathStyles st) const;
23         ///
24         void draw(Painter &, int x, int y) const;
25         ///
26         void write(std::ostream &, bool fragile) const;
27         ///
28         void writeNormal(std::ostream &) const;
29         /// 
30         int ascent() const;
31         ///
32         int descent() const;
33         ///
34         int width() const;
35         /// identifies Charinsets
36         bool isCharInset() const { return true; }
37         ///
38         char getChar() const { return char_; }
39
40 private:
41         /// the character
42         char char_;
43 };
44 #endif