]> git.lyx.org Git - lyx.git/blob - src/mathed/math_kerninset.C
Strip out redundant #includes
[lyx.git] / src / mathed / math_kerninset.C
1 /**
2  * \file math_kerninset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_kerninset.h"
14 #include "math_mathmlstream.h"
15 #include "math_streamstr.h"
16 #include "math_support.h"
17
18 using std::auto_ptr;
19
20
21 MathKernInset::MathKernInset()
22 {}
23
24
25 MathKernInset::MathKernInset(LyXLength const & w)
26         : wid_(w)
27 {}
28
29
30 MathKernInset::MathKernInset(string const & s)
31         : wid_(s)
32 {}
33
34
35 auto_ptr<InsetBase> MathKernInset::clone() const
36 {
37         return auto_ptr<InsetBase>(new MathKernInset(*this));
38 }
39
40
41 void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
42 {
43         dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
44         dim.asc = 0;
45         dim.des = 0;
46 }
47
48
49 void MathKernInset::draw(PainterInfo &, int, int) const
50 {}
51
52
53 void MathKernInset::write(WriteStream & os) const
54 {
55         os << "\\kern" << wid_.asLatexString() << ' ';
56 }
57
58
59 void MathKernInset::normalize(NormalStream & os) const
60 {
61         os << "[kern " << wid_.asLatexString() << ']';
62 }