2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_diminset.C
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
2002-09-11 09:14:57 +00:00
|
|
|
|
|
2002-03-19 16:55:58 +00:00
|
|
|
|
#include "math_diminset.h"
|
2004-08-14 14:03:42 +00:00
|
|
|
|
#include "coordcache.h"
|
2004-02-02 17:32:56 +00:00
|
|
|
|
#include "debug.h"
|
2002-03-19 16:55:58 +00:00
|
|
|
|
|
|
|
|
|
|
2004-02-02 17:32:56 +00:00
|
|
|
|
MathDimInset::MathDimInset()
|
|
|
|
|
{}
|
|
|
|
|
|
2004-01-30 11:41:12 +00:00
|
|
|
|
|
|
|
|
|
int MathDimInset::ascent() const
|
|
|
|
|
{
|
|
|
|
|
return dim_.asc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int MathDimInset::descent() const
|
|
|
|
|
{
|
|
|
|
|
return dim_.des;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int MathDimInset::width() const
|
2002-03-19 16:55:58 +00:00
|
|
|
|
{
|
2004-01-30 11:41:12 +00:00
|
|
|
|
return dim_.wid;
|
2002-03-19 16:55:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2004-01-30 11:41:12 +00:00
|
|
|
|
void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
|
2002-03-19 16:55:58 +00:00
|
|
|
|
{
|
2004-02-11 14:45:44 +00:00
|
|
|
|
//lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
|
2005-01-31 16:29:48 +00:00
|
|
|
|
theCoords.insets().add(this, x, y);
|
2002-03-19 16:55:58 +00:00
|
|
|
|
}
|