]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathXYArrow.h
Improve support for on screen length calculation
[lyx.git] / src / mathed / InsetMathXYArrow.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathXYArrow.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 "InsetMathNest.h"
16 #include "MetricsInfo.h"
17
18
19 namespace lyx {
20
21
22 // for the \ar stuff in \xymatrix
23
24 class InsetMathXYMatrix;
25
26 class InsetMathXYArrow : public InsetMathNest {
27 public:
28         ///
29         InsetMathXYArrow();
30         ///
31         virtual Inset * clone() const;
32         ///
33         bool metrics(MetricsInfo & mi) const;
34         ///
35         void draw(PainterInfo & pi, int x, int y) const;
36         ///
37         InsetMathXYArrow * asXYArrowInset() { return this; }
38
39         ///
40         void write(WriteStream & os) const;
41         ///
42         void normalize(NormalStream &) const;
43         ///
44         InsetMathXYMatrix const * targetMatrix() const;
45         ///
46         MathData const & targetCell() const;
47         ///
48         MathData const & sourceCell() const;
49         ///
50         InsetCode lyxCode() const { return MATH_XYARROW_CODE; }
51         ///
52         void mathmlize(MathStream &) const;
53         ///
54         void htmlize(HtmlStream &) const;
55
56         ///
57         bool up_;
58         ///
59         mutable MetricsInfo mi_;
60         ///
61         mutable Font font_;
62         ///
63         mutable InsetMathXYMatrix const * target_;
64 };
65
66
67
68 } // namespace lyx
69 #endif