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.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11 
12 #ifndef MATH_CHEATINSET_H
13 #define MATH_CHEATINSET_H
14 
15 #include "InsetMath.h"
16 #include "Length.h"
17 
18 
19 namespace lyx {
20 
21 
22 /// The \kern primitive
23 /// Some hack for visual effects
24 
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 	///
mathmlize(MathStream &)42 	void mathmlize(MathStream &) const { }
43 	///
htmlize(HtmlStream &)44 	void htmlize(HtmlStream &) const { }
45 	///
46 	void infoize2(odocstream & os) const;
47 	///
lyxCode()48 	InsetCode lyxCode() const { return MATH_KERN_CODE; }
49 
50 private:
51 	virtual Inset * clone() const;
52 	/// width in em
53 	Length wid_;
54 };
55 
56 
57 } // namespace lyx
58 #endif
59