]> git.lyx.org Git - lyx.git/blob - src/mathed/math_xyarrowinset.h
Fix event loop to no longer eat CPU
[lyx.git] / src / mathed / math_xyarrowinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_xyarrowinset.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_XYARROWINSET_H
13 #define MATH_ARROWINSET_H
14
15 #include "math_nestinset.h"
16 #include "metricsinfo.h"
17
18
19 // for the \ar stuff in \xymatrix
20
21 class MathXYMatrixInset;
22
23 class MathXYArrowInset : public MathNestInset {
24 public:
25         ///
26         MathXYArrowInset();
27         ///
28         virtual std::auto_ptr<InsetBase> clone() const;
29         ///
30         void metrics(MetricsInfo & mi) const;
31         ///
32         void draw(PainterInfo & pi, int x, int y) const;
33         ///
34         MathXYArrowInset * asXYArrowInset() { return this; }
35
36         ///
37         void normalize();
38         ///
39         void write(WriteStream & os) const;
40         ///
41         void normalize(NormalStream &) const;
42
43 public:
44         ///
45         MathXYMatrixInset const * targetMatrix() const;
46         ///
47         MathArray const & targetCell() const;
48         ///
49         MathArray const & sourceCell() const;
50
51         ///
52         bool up_;
53         ///
54         mutable MetricsInfo mi_;
55         ///
56         mutable LyXFont font_;
57         ///
58         mutable MathXYMatrixInset const * target_;
59 };
60
61 #endif