2001-11-09 14:48:57 +00:00
|
|
|
#include "math_exintinset.h"
|
|
|
|
#include "math_support.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_symbolinset.h"
|
|
|
|
|
|
|
|
|
2001-11-09 16:27:44 +00:00
|
|
|
MathExIntInset::MathExIntInset()
|
|
|
|
: int_(new MathSymbolInset("int"))
|
2001-11-09 14:48:57 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathExIntInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathExIntInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 16:27:44 +00:00
|
|
|
void MathExIntInset::differential(MathArray const & ar)
|
2001-11-09 14:48:57 +00:00
|
|
|
{
|
2001-11-09 16:27:44 +00:00
|
|
|
diff_ = ar;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::core(MathArray const & ar)
|
|
|
|
{
|
|
|
|
core_ = ar;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::scripts(MathAtom const & at)
|
|
|
|
{
|
|
|
|
scripts_ = at;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::symbol(MathAtom const & at)
|
|
|
|
{
|
|
|
|
int_ = at;
|
2001-11-09 14:48:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-09 16:27:44 +00:00
|
|
|
bool MathExIntInset::hasScripts() const
|
|
|
|
{
|
|
|
|
return scripts_.hasNucleus();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-11-09 14:48:57 +00:00
|
|
|
void MathExIntInset::normalize(NormalStream & os) const
|
|
|
|
{
|
2001-11-09 16:27:44 +00:00
|
|
|
os << "[int ";
|
|
|
|
if (hasScripts())
|
|
|
|
os << scripts_.nucleus();
|
|
|
|
else
|
|
|
|
os << "{}";
|
|
|
|
os << ' ' << core_ << ' ' << diff_ << ']';
|
2001-11-09 14:48:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::metrics(MathMetricsInfo const &) const
|
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::draw(Painter &, int, int) const
|
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::maplize(MapleStream & os) const
|
|
|
|
{
|
2001-11-09 16:27:44 +00:00
|
|
|
os << int_.nucleus() << '(' << core_ << ',' << diff_;
|
|
|
|
if (hasScripts()) {
|
|
|
|
MathScriptInset * p = scripts_->asScriptInset();
|
|
|
|
os << '=' << p->down().data_ << ".." << p->up().data_;
|
|
|
|
}
|
|
|
|
os << ')';
|
2001-11-09 14:48:57 +00:00
|
|
|
}
|
|
|
|
|
2001-11-09 16:27:44 +00:00
|
|
|
|
2001-11-09 14:48:57 +00:00
|
|
|
void MathExIntInset::mathmlize(MathMLStream & os) const
|
|
|
|
{
|
|
|
|
//os << name_.c_str() << '(' << cell(0) << ')';
|
|
|
|
}
|
2001-11-09 16:27:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
void MathExIntInset::write(WriteStream & os) const
|
|
|
|
{
|
|
|
|
if (hasScripts())
|
|
|
|
os << scripts_.nucleus();
|
|
|
|
os << core_ << "d" << diff_;
|
|
|
|
}
|
|
|
|
|