]> git.lyx.org Git - lyx.git/blob - src/mathed/math_notinset.C
- remove MathStyles cache from those insets that don't need it
[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(MathWriteInfo & os) 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(MathMetricsInfo const & mi) const
32 {
33         mi_ = mi;
34         if (math_font_available(LM_TC_CMSY))
35                 mathed_char_dim(LM_TC_CMSY, mi_, 54, ascent_, descent_, width_);
36         else
37                 mathed_char_dim(LM_TC_VAR, mi_, '/', ascent_, descent_, width_);
38         width_ = 0;
39 }
40
41
42 void MathNotInset::draw(Painter & pain, int x, int y) const
43 {  
44         xo(x);
45         yo(y);
46
47         if (math_font_available(LM_TC_CMSY))
48                 drawChar(pain, LM_TC_CMSY, mi_, x, y, 54);
49         else
50                 drawChar(pain, LM_TC_VAR, mi_, x, y, '/');
51 }