]> git.lyx.org Git - lyx.git/blob - src/mathed/math_kerninset.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / mathed / math_kerninset.C
1 #include <config.h>
2
3
4 #include "math_kerninset.h"
5 #include "math_extern.h"
6 #include "math_mathmlstream.h"
7 #include "math_streamstr.h"
8 #include "math_support.h"
9
10 using std::auto_ptr;
11
12
13 MathKernInset::MathKernInset()
14 {}
15
16
17 MathKernInset::MathKernInset(LyXLength const & w)
18         : wid_(w)
19 {}
20
21
22 MathKernInset::MathKernInset(string const & s)
23         : wid_(s)
24 {}
25
26
27 auto_ptr<InsetBase> MathKernInset::clone() const
28 {
29         return auto_ptr<InsetBase>(new MathKernInset(*this));
30 }
31
32
33 void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
34 {
35         dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
36         dim.asc = 0;
37         dim.des = 0;
38 }
39
40
41 void MathKernInset::draw(PainterInfo &, int, int) const
42 {}
43
44
45 void MathKernInset::write(WriteStream & os) const
46 {
47         os << "\\kern" << wid_.asLatexString() << ' ';
48 }
49
50
51 void MathKernInset::normalize(NormalStream & os) const
52 {
53         os << "[kern " << wid_.asLatexString() << ']';
54 }