2001-12-05 08:04:20 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2001-08-07 04:49:50 +00:00
|
|
|
#include "math_funcliminset.h"
|
2001-11-08 12:06:56 +00:00
|
|
|
#include "math_mathmlstream.h"
|
2001-12-05 08:04:20 +00:00
|
|
|
#include "math_streamstr.h"
|
2001-11-08 12:15:12 +00:00
|
|
|
#include "math_support.h"
|
2001-08-07 04:49:50 +00:00
|
|
|
|
|
|
|
|
2001-11-07 13:15:59 +00:00
|
|
|
MathFuncLimInset::MathFuncLimInset(string const & name)
|
|
|
|
: name_(name)
|
2001-08-07 04:49:50 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathFuncLimInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathFuncLimInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-09-11 10:58:17 +00:00
|
|
|
bool MathFuncLimInset::isScriptable() const
|
|
|
|
{
|
2002-05-30 07:09:54 +00:00
|
|
|
return scriptable_;
|
2001-09-11 10:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 08:35:57 +00:00
|
|
|
void MathFuncLimInset::write(WriteStream & os) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2001-12-05 08:04:20 +00:00
|
|
|
os << '\\' << name_ << ' ';
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 08:35:57 +00:00
|
|
|
void MathFuncLimInset::normalize(NormalStream & os) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2001-12-05 08:04:20 +00:00
|
|
|
os << "[funclim " << name_ << ']';
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathFuncLimInset::metrics(MathMetricsInfo & mi) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2002-05-30 07:09:54 +00:00
|
|
|
scriptable_ = (mi.base.style == LM_ST_DISPLAY);
|
|
|
|
mathed_string_dim(mi.base.font, name_, ascent_, descent_, width_);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathFuncLimInset::draw(MathPainterInfo & pi, int x, int y) const
|
2002-03-21 17:42:56 +00:00
|
|
|
{
|
2002-05-30 07:09:54 +00:00
|
|
|
drawStrBlack(pi, x, y, name_);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|