]> git.lyx.org Git - lyx.git/blob - src/mathed/math_noglyphinset.C
fix broken ^ stuff; break delimiters...
[lyx.git] / src / mathed / math_noglyphinset.C
1 #include "math_noglyphinset.h"
2 #include "math_parser.h"
3 #include "support.h"
4 #include "support/LOstream.h"
5
6
7 using std::ostream;
8
9 MathNoglyphInset::MathNoglyphInset(const latexkeys * l)
10         : sym_(l)
11 {}
12
13
14 MathInset * MathNoglyphInset::clone() const
15 {
16         return new MathNoglyphInset(*this);
17 }
18
19
20 void MathNoglyphInset::write(ostream & os, bool /* fragile */) const
21 {
22         os << '\\' << sym_->name << ' ';
23 }
24
25
26 void MathNoglyphInset::writeNormal(ostream & os) const
27 {
28         os << "[bigop " << sym_->name << "] ";
29 }
30
31
32 void MathNoglyphInset::metrics(MathStyles st) const
33 {
34         size(st);
35         mathed_string_dim(LM_TC_TEX, st, sym_->name, ascent_, descent_, width_);
36 }
37
38
39 void MathNoglyphInset::draw(Painter & pain, int x, int y) const
40 {  
41         xo(x);
42         yo(y);
43         drawStr(pain, LM_TC_TEX, size_, x, y, sym_->name);
44 }