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