]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathKern.h
Fix bug 2789 (as discussed)
[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 #include "lyxlength.h"
17
18
19 /// The \kern primitive
20 /// Some hack for visual effects
21
22 class InsetMathKern : public InsetMath {
23 public:
24         ///
25         InsetMathKern();
26         ///
27         explicit InsetMathKern(LyXLength const & wid);
28         ///
29         explicit InsetMathKern(std::string const & wid);
30         ///
31         void metrics(MetricsInfo & mi, Dimension & dim) const;
32         ///
33         void draw(PainterInfo & pi, int x, int y) const;
34         ///
35         void write(WriteStream & os) const;
36         ///
37         void normalize(NormalStream & ns) const;
38         ///
39         int width() const;
40 private:
41         virtual std::auto_ptr<InsetBase> doClone() const;
42         /// width in em
43         LyXLength wid_;
44         /// in pixels
45         mutable int wid_pix_;
46
47 };
48 #endif