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.
8 * Full author contact details are available in file CREDITS.
13 #include "math_kerninset.h"
14 #include "math_mathmlstream.h"
15 #include "math_streamstr.h"
16 #include "math_support.h"
17 #include "dimension.h"
23 MathKernInset::MathKernInset()
27 MathKernInset::MathKernInset(LyXLength const & w)
32 MathKernInset::MathKernInset(string const & s)
37 auto_ptr<InsetBase> MathKernInset::doClone() const
39 return auto_ptr<InsetBase>(new MathKernInset(*this));
43 void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
45 wid_pix_ = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
52 int MathKernInset::width() const
58 void MathKernInset::draw(PainterInfo &, int, int) const
62 void MathKernInset::write(WriteStream & os) const
64 os << "\\kern" << wid_.asLatexString() << ' ';
68 void MathKernInset::normalize(NormalStream & os) const
70 os << "[kern " << wid_.asLatexString() << ']';