]> git.lyx.org Git - lyx.git/blob - src/mathed/math_notinset.C
oh well
[lyx.git] / src / mathed / math_notinset.C
1 #include "math_notinset.h"
2 #include "math_parser.h"
3 #include "math_mathmlstream.h"
4 #include "math_support.h"
5
6
7 MathNotInset::MathNotInset()
8 {}
9
10
11 MathInset * MathNotInset::clone() const
12 {
13         return new MathNotInset(*this);
14 }
15
16
17 void MathNotInset::write(WriteStream & os) const
18 {
19         os << "\\not ";
20 }
21
22
23 void MathNotInset::normalize(NormalStream & os) const
24 {
25         os << "[not] ";
26 }
27
28
29 void MathNotInset::metrics(MathMetricsInfo const & mi) const
30 {
31         if (math_font_available(LM_TC_CMSY)) {
32                 whichFont(font_, LM_TC_CMSY, mi);
33                 mathed_char_dim(font_, 54, ascent_, descent_, width_);
34         }
35         else {
36                 whichFont(font_, LM_TC_VAR, mi);
37                 mathed_char_dim(font_, '/', ascent_, descent_, width_);
38         }
39         width_ = 0;
40 }
41
42
43 void MathNotInset::draw(Painter & pain, int x, int y) const
44 {
45         if (math_font_available(LM_TC_CMSY))
46                 drawChar(pain, font_, x, y, 54);
47         else
48                 drawChar(pain, font_, x, y, '/');
49 }