2001-08-03 17:56:11 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_diminset.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2001-08-03 17:56:11 +00:00
|
|
|
|
#ifndef MATH_DIMINSET_H
|
|
|
|
|
#define MATH_DIMINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_inset.h"
|
2002-07-11 11:27:24 +00:00
|
|
|
|
#include "dimension.h"
|
2001-08-03 17:56:11 +00:00
|
|
|
|
|
2004-01-30 11:41:12 +00:00
|
|
|
|
class PainterInfo;
|
|
|
|
|
|
2003-05-28 13:22:36 +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:
|
2004-02-02 17:32:56 +00:00
|
|
|
|
///
|
2004-04-03 08:37:12 +00:00
|
|
|
|
MathDimInset();
|
2004-02-02 17:32:56 +00:00
|
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
|
///
|
2002-07-30 13:56:02 +00:00
|
|
|
|
Dimension dimensions() const { return dim_; }
|
2002-03-19 16:55:58 +00:00
|
|
|
|
///
|
2004-01-30 11:41:12 +00:00
|
|
|
|
int ascent() const;
|
|
|
|
|
///
|
|
|
|
|
int descent() const;
|
|
|
|
|
///
|
|
|
|
|
int width() const;
|
|
|
|
|
|
2002-03-19 16:55:58 +00:00
|
|
|
|
///
|
2004-01-30 11:41:12 +00:00
|
|
|
|
void setPosCache(PainterInfo const & pi, 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
|
|
|
|
};
|
2004-02-03 11:21:08 +00:00
|
|
|
|
|
2001-08-03 17:56:11 +00:00
|
|
|
|
#endif
|