Give inset codes to all the math insets, so we get more information when
[lyx.git] / src / mathed / InsetMathKern.h
blob902f19e1f3c9ebf1211986f447b8aaa97e5e91d6
1 // -*- C++ -*-
2 /**
3 * \file InsetMathKern.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_CHEATINSET_H
13 #define MATH_CHEATINSET_H
15 #include "InsetMath.h"
16 #include "Length.h"
19 namespace lyx {
22 /// The \kern primitive
23 /// Some hack for visual effects
25 class InsetMathKern : public InsetMath {
26 public:
27 ///
28 InsetMathKern();
29 ///
30 explicit InsetMathKern(Length const & wid);
31 ///
32 explicit InsetMathKern(docstring const & wid);
33 ///
34 void metrics(MetricsInfo & mi, Dimension & dim) const;
35 ///
36 void draw(PainterInfo & pi, int x, int y) const;
37 ///
38 void write(WriteStream & os) const;
39 ///
40 void normalize(NormalStream & ns) const;
41 ///
42 InsetCode lyxCode() const { return MATH_KERN_CODE; }
44 private:
45 virtual Inset * clone() const;
46 /// width in em
47 Length wid_;
51 } // namespace lyx
52 #endif