2001-08-03 17:56:11 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATH_DIMINSET_H
|
|
|
|
#define MATH_DIMINSET_H
|
|
|
|
|
2002-09-11 09:14:57 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-08-03 17:56:11 +00:00
|
|
|
#include "math_inset.h"
|
2002-07-11 11:27:24 +00:00
|
|
|
#include "dimension.h"
|
2001-08-03 17:56:11 +00:00
|
|
|
|
2001-08-06 17:20:26 +00:00
|
|
|
/// things that need the dimension cache
|
|
|
|
|
2001-08-03 17:56:11 +00:00
|
|
|
class MathDimInset : public MathInset {
|
|
|
|
public:
|
2002-03-12 16:39:27 +00:00
|
|
|
/// not sure whether the initialization is really necessary
|
2002-07-11 11:27:24 +00:00
|
|
|
MathDimInset() {}
|
2002-03-21 17:42:56 +00:00
|
|
|
/// read ascent value (should be inline according to gprof)
|
2002-07-11 11:27:24 +00:00
|
|
|
int ascent() const { return dim_.ascent(); }
|
2002-03-21 17:42:56 +00:00
|
|
|
/// read descent
|
2002-07-11 11:27:24 +00:00
|
|
|
int descent() const { return dim_.descent(); }
|
2002-03-12 16:39:27 +00:00
|
|
|
/// read width
|
2002-07-11 11:27:24 +00:00
|
|
|
int width() const { return dim_.width(); }
|
2002-07-08 16:20:53 +00:00
|
|
|
///
|
2002-07-30 13:56:02 +00:00
|
|
|
Dimension dimensions() const { return dim_; }
|
2002-03-19 16:55:58 +00:00
|
|
|
///
|
2002-03-21 06:57:13 +00:00
|
|
|
void metricsT(TextMetricsInfo const &) const;
|
2002-03-19 16:55:58 +00:00
|
|
|
///
|
2002-03-21 06:57:13 +00:00
|
|
|
void drawT(TextPainter & pain, int x, int y) const;
|
2001-08-03 17:56:11 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
///
|
2002-07-11 11:27:24 +00:00
|
|
|
mutable Dimension dim_;
|
2001-08-03 17:56:11 +00:00
|
|
|
};
|
|
|
|
#endif
|