]> git.lyx.org Git - lyx.git/blob - src/mathed/math_notinset.C
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / math_notinset.C
1 #include "math_notinset.h"
2 #include "math_parser.h"
3 #include "support.h"
4 #include "support/LOstream.h"
5
6
7 using std::ostream;
8
9 MathNotInset::MathNotInset()
10 {}
11
12
13 MathInset * MathNotInset::clone() const
14 {
15         return new MathNotInset(*this);
16 }
17
18
19 void MathNotInset::write(ostream & os, bool /* fragile */) const
20 {
21         os << "\\not ";
22 }
23
24
25 void MathNotInset::writeNormal(ostream & os) const
26 {
27         os << "[not] ";
28 }
29
30
31 void MathNotInset::metrics(MathStyles st) const
32 {
33         size(st);
34         if (math_font_available(LM_TC_CMSY))
35                 mathed_char_dim(LM_TC_CMSY, size_, 54,
36                                 ascent_, descent_, width_);
37                 else
38                         mathed_char_dim(LM_TC_VAR, size_, '/',
39                                         ascent_, descent_, width_);
40         width_ = 0;
41 }
42
43
44 void MathNotInset::draw(Painter & pain, int x, int y) const
45 {  
46         xo(x);
47         yo(y);
48
49         if (math_font_available(LM_TC_CMSY))
50                 drawChar(pain, LM_TC_CMSY, size_, x, y, 54);
51         else
52                 drawChar(pain, LM_TC_VAR, size_, x, y, '/');
53 }