2001-08-07 04:49:50 +00:00
|
|
|
#include "math_funcliminset.h"
|
2001-11-07 13:15:59 +00:00
|
|
|
#include "support.h"
|
2001-08-07 04:49:50 +00:00
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
|
|
|
|
|
|
using std::ostream;
|
|
|
|
|
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
|
|
|
|
{
|
2001-10-22 15:37:49 +00:00
|
|
|
return mi_.style == LM_ST_DISPLAY;
|
2001-09-11 10:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-19 11:25:48 +00:00
|
|
|
void MathFuncLimInset::write(MathWriteInfo & os) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2001-11-07 13:15:59 +00:00
|
|
|
os << '\\' << name_ << ' ';
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathFuncLimInset::writeNormal(ostream & os) const
|
|
|
|
{
|
2001-11-07 13:15:59 +00:00
|
|
|
os << "[" << name_ << "] ";
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-22 15:37:49 +00:00
|
|
|
void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2001-10-22 15:37:49 +00:00
|
|
|
mi_ = mi;
|
2001-11-07 13:15:59 +00:00
|
|
|
mathed_string_dim(LM_TC_TEXTRM, mi_, name_, ascent_, descent_, width_);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathFuncLimInset::draw(Painter & pain, int x, int y) const
|
|
|
|
{
|
2001-11-07 13:15:59 +00:00
|
|
|
drawStr(pain, LM_TC_TEXTRM, mi_, x, y, name_);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|