]> git.lyx.org Git - lyx.git/blob - src/mathed/math_specialcharinset.h
oh well
[lyx.git] / src / mathed / math_specialcharinset.h
1 // -*- C++ -*-
2 #ifndef MATH_SPECIALCHARINSET_H
3 #define MATH_SPECIALCHARINSET_H
4
5 #include "math_inset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** An inset for characters like {, #, and $ that need to be escaped
12     when written out, but can be inserted by a single keystroke
13     \author André Pönitz
14  */
15
16 class MathSpecialCharInset : public MathInset {
17 public:
18         ///
19         explicit MathSpecialCharInset(char c);
20         ///
21         MathInset * clone() const;
22         ///
23         void metrics(MathMetricsInfo const & st) const;
24         ///
25         void draw(Painter &, int x, int y) const;
26         ///
27         void write(WriteStream & os) const;
28         ///
29         void normalize(NormalStream &) const;
30         ///
31         int ascent() const;
32         ///
33         int descent() const;
34         ///
35         int width() const;
36
37 private:
38         /// the character
39         char char_;
40         ///
41         mutable LyXFont font_;
42 };
43 #endif