]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diminset.h
Ensure all #warning statements are wrapped by #ifdef WITH_WARNINGS.
[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         MathDimInset();
26
27         ///
28         Dimension dimensions() const { return dim_; }
29         ///
30         int ascent() const;
31         ///
32         int descent() const;
33         ///
34         int width() const;
35
36         ///
37         int xo() const { return xo_; }
38         ///
39         int yo() const { return yo_; }
40         ///
41         void setPosCache(PainterInfo const & pi, int x, int y) const;
42
43 protected:
44         ///
45         mutable Dimension dim_;
46         ///
47         mutable int xo_;
48         ///
49         mutable int yo_;
50 };
51
52 #endif