]> git.lyx.org Git - lyx.git/blob - src/mathed/math_kerninset.h
Fix event loop to no longer eat CPU
[lyx.git] / src / mathed / math_kerninset.h
1 // -*- C++ -*-
2 /**
3  * \file math_kerninset.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 "math_inset.h"
16 #include "lyxlength.h"
17
18
19 /// The \kern primitive
20 /// Some hack for visual effects
21
22 class MathKernInset : public MathInset {
23 public:
24         ///
25         MathKernInset();
26         ///
27         explicit MathKernInset(LyXLength const & wid);
28         ///
29         explicit MathKernInset(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