]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathKern.h
Force a Buffer * argument to math insets constructor
[lyx.git] / src / mathed / InsetMathKern.h
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
17 #include "support/Length.h"
18
19
20 namespace lyx {
21
22
23 /// The \kern primitive
24 /// Some hack for visual effects
25
26 class InsetMathKern : public InsetMath {
27 public:
28         ///
29         InsetMathKern(Buffer * buf);
30         ///
31         explicit InsetMathKern(Buffer * buf, Length const & wid);
32         ///
33         explicit InsetMathKern(Buffer * buf, docstring const & wid);
34         ///
35         void metrics(MetricsInfo & mi, Dimension & dim) const override;
36         ///
37         void draw(PainterInfo & pi, int x, int y) const override;
38         ///
39         void write(TeXMathStream & os) const override;
40         ///
41         void normalize(NormalStream & ns) const override;
42         ///
43         void mathmlize(MathMLStream &) const override { }
44         ///
45         void htmlize(HtmlStream &) const override { }
46         ///
47         void infoize2(odocstream & os) const override;
48         ///
49         InsetCode lyxCode() const override { return MATH_KERN_CODE; }
50
51 private:
52         Inset * clone() const override;
53         /// width in em
54         Length wid_;
55 };
56
57
58 } // namespace lyx
59 #endif