]> git.lyx.org Git - lyx.git/blob - src/mathed/math_funcliminset.C
don't #include too much stuff in .h
[lyx.git] / src / mathed / math_funcliminset.C
1 #include "math_funcliminset.h"
2 #include "math_mathmlstream.h"
3 #include "support.h"
4
5
6 MathFuncLimInset::MathFuncLimInset(string const & name)
7         : name_(name)
8 {}
9
10
11 MathInset * MathFuncLimInset::clone() const
12 {
13         return new MathFuncLimInset(*this);
14 }
15
16
17 bool MathFuncLimInset::isScriptable() const
18 {
19         return mi_.style == LM_ST_DISPLAY;
20 }
21
22
23 void MathFuncLimInset::write(MathWriteInfo & os) const
24 {
25         os << '\\' << name_.c_str() << ' ';
26 }
27
28
29 void MathFuncLimInset::writeNormal(NormalStream & os) const
30 {
31         os << "[funclim " << name_.c_str() << ']';
32 }
33
34
35 void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
36 {
37         mi_ = mi;
38         mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
39 }
40
41
42 void MathFuncLimInset::draw(Painter & pain, int x, int y) const
43 {  
44         drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
45 }