]> git.lyx.org Git - lyx.git/blob - src/mathed/math_kerninset.C
small up/down tweaking
[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
13
14 MathKernInset::MathKernInset()
15 {}
16
17
18 MathKernInset::MathKernInset(LyXLength const & w)
19         : wid_(w)
20 {}
21
22
23 MathKernInset::MathKernInset(string const & s)
24         : wid_(s)
25 {}
26
27
28 MathInset * MathKernInset::clone() const
29 {
30         return new MathKernInset(*this);
31 }
32
33
34 void MathKernInset::metrics(MathMetricsInfo & mi) const
35 {
36         dim_.w = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
37         dim_.a = 0;
38         dim_.d = 0;
39 }
40
41
42 void MathKernInset::draw(MathPainterInfo &, int, int) const
43 {}
44
45
46 void MathKernInset::write(WriteStream & os) const
47 {
48         os << "\\kern" << wid_.asLatexString() << ' ';
49 }
50
51
52 void MathKernInset::normalize(NormalStream & os) const
53 {
54         os << "[kern " << wid_.asLatexString() << ']';
55 }