]> git.lyx.org Git - lyx.git/blob - src/mathed/math_funcliminset.C
enable direct input of #1...#9; some whitespace changes
[lyx.git] / src / mathed / math_funcliminset.C
1 #include <config.h>
2
3 #include "math_funcliminset.h"
4 #include "math_mathmlstream.h"
5 #include "math_streamstr.h"
6 #include "math_support.h"
7
8
9 MathFuncLimInset::MathFuncLimInset(string const & name)
10         : name_(name)
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 mi_.style == LM_ST_DISPLAY;
23 }
24
25
26 void MathFuncLimInset::write(WriteStream & os) const
27 {
28         os << '\\' << name_ << ' ';
29 }
30
31
32 void MathFuncLimInset::normalize(NormalStream & os) const
33 {
34         os << "[funclim " << name_ << ']';
35 }
36
37
38 void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
39 {
40         mi_ = mi;
41         mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
42 }
43
44
45 void MathFuncLimInset::draw(Painter & pain, int x, int y) const
46 {  
47         drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
48 }