]> git.lyx.org Git - lyx.git/blob - src/mathed/math_diminset.h
small up/down tweaking
[lyx.git] / src / mathed / math_diminset.h
1 // -*- C++ -*-
2 #ifndef MATH_DIMINSET_H
3 #define MATH_DIMINSET_H
4
5 #ifdef __GNUG__
6 #pragma interface
7 #endif
8
9 #include "math_inset.h"
10 #include "dimension.h"
11
12 /// things that need the dimension cache
13
14 class MathDimInset : public MathInset {
15 public:
16         /// not sure whether the initialization is really necessary
17         MathDimInset() {}
18         /// read ascent value (should be inline according to gprof)
19         int ascent() const { return dim_.ascent(); }
20         /// read descent
21         int descent() const { return dim_.descent(); }
22         /// read width
23         int width() const { return dim_.width(); }
24         ///
25         Dimension dimensions() const { return dim_; }
26         ///
27         void metricsT(TextMetricsInfo const &) const;
28         ///
29         void drawT(TextPainter & pain, int x, int y) const;
30
31 protected:
32         ///
33         mutable Dimension dim_;
34 };
35 #endif