]> git.lyx.org Git - lyx.git/blob - src/mathed/math_specialcharinset.C
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_specialcharinset.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_specialcharinset.h"
6 #include "math_mathmlstream.h"
7 #include "math_support.h"
8
9
10 MathSpecialCharInset::MathSpecialCharInset(char c)
11         : char_(c)
12 {}
13
14
15 MathInset * MathSpecialCharInset::clone() const
16 {
17         return new MathSpecialCharInset(*this);
18 }
19
20
21 int MathSpecialCharInset::ascent() const
22 {
23         return mathed_char_ascent(font_, char_);
24 }
25
26
27 int MathSpecialCharInset::descent() const
28 {
29         return mathed_char_descent(font_, char_);
30 }
31
32
33 int MathSpecialCharInset::width() const
34 {
35         return mathed_char_width(font_, char_);
36 }
37
38
39 void MathSpecialCharInset::metrics(MathMetricsInfo const & mi) const
40 {
41         whichFont(font_, LM_TC_CONST, mi);
42 }
43
44
45 void MathSpecialCharInset::draw(Painter & pain, int x, int y) const
46 {
47         drawChar(pain, font_, x, y, char_);
48 }
49
50
51 void MathSpecialCharInset::write(WriteStream & os) const
52 {
53         os << "\\" << char_;
54 }
55
56
57 void MathSpecialCharInset::normalize(NormalStream & os) const
58 {
59         os << "\\" << char_;
60 }