2001-08-07 04:49:50 +00:00
|
|
|
#include "math_funcliminset.h"
|
|
|
|
#include "mathed/math_parser.h"
|
2001-08-09 09:19:18 +00:00
|
|
|
#include "mathed/support.h"
|
2001-08-07 04:49:50 +00:00
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
|
|
|
|
|
|
using std::ostream;
|
|
|
|
|
|
|
|
MathFuncLimInset::MathFuncLimInset(const latexkeys * l)
|
|
|
|
: sym_(l)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathFuncLimInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathFuncLimInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-09-11 10:58:17 +00:00
|
|
|
bool MathFuncLimInset::isScriptable() const
|
|
|
|
{
|
2001-10-19 17:46:13 +00:00
|
|
|
return size_.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
|
|
|
{
|
|
|
|
os << '\\' << sym_->name << ' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathFuncLimInset::writeNormal(ostream & os) const
|
|
|
|
{
|
|
|
|
os << "[" << sym_->name << "] ";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-19 11:25:48 +00:00
|
|
|
void MathFuncLimInset::metrics(MathMetricsInfo const & st) const
|
2001-08-07 04:49:50 +00:00
|
|
|
{
|
2001-10-19 11:25:48 +00:00
|
|
|
size_ = st;
|
2001-10-19 17:46:13 +00:00
|
|
|
mathed_string_dim(LM_TC_TEXTRM, size_, sym_->name,
|
2001-10-19 11:25:48 +00:00
|
|
|
ascent_, descent_, width_);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathFuncLimInset::draw(Painter & pain, int x, int y) const
|
|
|
|
{
|
|
|
|
xo(x);
|
|
|
|
yo(y);
|
2001-10-19 17:46:13 +00:00
|
|
|
drawStr(pain, LM_TC_TEXTRM, size_, x, y, sym_->name);
|
2001-08-07 04:49:50 +00:00
|
|
|
}
|