]> git.lyx.org Git - lyx.git/blob - src/mathed/math_funcliminset.C
b527af5fa2dde66e6a45fda5d31609f59f131f6d
[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 void MathFuncLimInset::write(ostream & os, bool /* fragile */) const
21 {
22         os << '\\' << sym_->name << ' ';
23 }
24
25
26 void MathFuncLimInset::writeNormal(ostream & os) const
27 {
28         os << "[" << sym_->name << "] ";
29 }
30
31
32 void MathFuncLimInset::metrics(MathStyles st) const
33 {
34         size(st);
35         mathed_string_dim(LM_TC_TEXTRM, size(), sym_->name, ascent_, descent_, width_);
36 }
37
38
39 void MathFuncLimInset::draw(Painter & pain, int x, int y) const
40 {  
41         xo(x);
42         yo(y);
43         drawStr(pain, LM_TC_TEXTRM, size_, x, y, sym_->name);
44 }