]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diminset.h
2131e5d7405f635c8a753947e223691e2881d4c4
[lyx.git] / src / mathed / math_diminset.h
1 // -*- C++ -*-
2 /**
3  * \file math_diminset.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_DIMINSET_H
13 #define MATH_DIMINSET_H
14
15 #include "math_inset.h"
16 #include "dimension.h"
17
18 class PainterInfo;
19
20
21 /// things that need the dimension cache
22 class MathDimInset : public MathInset {
23 public:
24         ///
25         Dimension dimensions() const { return dim_; }
26         ///
27         int ascent() const;
28         ///
29         int descent() const;
30         ///
31         int width() const;
32
33         ///
34         int xo() const { return xo_; }
35         ///
36         int yo() const { return yo_; }
37         ///
38         void setPosCache(PainterInfo const & pi, int x, int y) const;
39
40 protected:
41         ///
42         mutable Dimension dim_;
43         ///
44         mutable int xo_;
45         ///
46         mutable int yo_;
47 };
48 #endif