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