2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
|
* \file InsetMathDim.C
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* 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
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "InsetMathDim.h"
|
2006-10-13 16:44:44 +00:00
|
|
|
|
|
|
|
|
|
#include "BufferView.h"
|
2004-08-14 14:03:42 +00:00
|
|
|
|
#include "coordcache.h"
|
2004-02-02 17:32:56 +00:00
|
|
|
|
#include "debug.h"
|
2006-10-13 16:44:44 +00:00
|
|
|
|
#include "metricsinfo.h"
|
2002-03-19 16:55:58 +00:00
|
|
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathDim::InsetMathDim()
|
2004-02-02 17:32:56 +00:00
|
|
|
|
{}
|
|
|
|
|
|
2004-01-30 11:41:12 +00:00
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
int InsetMathDim::ascent() const
|
2004-01-30 11:41:12 +00:00
|
|
|
|
{
|
|
|
|
|
return dim_.asc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
int InsetMathDim::descent() const
|
2004-01-30 11:41:12 +00:00
|
|
|
|
{
|
|
|
|
|
return dim_.des;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
int InsetMathDim::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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-13 16:44:44 +00:00
|
|
|
|
void InsetMathDim::setPosCache(PainterInfo const & pi, int x, int y) const
|
2002-03-19 16:55:58 +00:00
|
|
|
|
{
|
2006-09-16 18:11:38 +00:00
|
|
|
|
//lyxerr << "InsetMathDim: cache to " << x << " " << y << std::endl;
|
2006-10-13 16:44:44 +00:00
|
|
|
|
pi.base.bv->coordCache().insets().add(this, x, y);
|
2002-03-19 16:55:58 +00:00
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|