]> git.lyx.org Git - lyx.git/blob - src/mathed/math_kerninset.C
replace (ascent, descent, width) triples by a structure 'dimension'
[lyx.git] / src / mathed / math_kerninset.C
1 #include <config.h>
2
3 #ifdef __GNUG__
4 #pragma implementation
5 #endif
6
7 #include "math_kerninset.h"
8 #include "math_extern.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
11 #include "math_support.h"
12 #include "lyxrc.h"
13
14
15 MathKernInset::MathKernInset()
16 {}
17
18
19 MathKernInset::MathKernInset(LyXLength const & w)
20         : wid_(w)
21 {}
22
23
24 MathKernInset::MathKernInset(string const & s)
25         : wid_(s)
26 {}
27
28
29 MathInset * MathKernInset::clone() const
30 {
31         return new MathKernInset(*this);
32 }
33
34
35 void MathKernInset::metrics(MathMetricsInfo & /*mi*/) const
36 {
37         dim_.w = wid_.inBP();
38         dim_.a = 0;
39         dim_.d = 0;
40 }
41
42
43 void MathKernInset::draw(MathPainterInfo &, int, int) const
44 {}
45
46
47 void MathKernInset::write(WriteStream & os) const
48 {
49         os << "\\kern" << wid_.asLatexString() << " ";
50 }
51
52
53 void MathKernInset::normalize(NormalStream & os) const
54 {
55         os << "[kern " << wid_.asLatexString() << "]";
56 }