2001-11-13 16:27:06 +00:00
|
|
|
#include "math_diffinset.h"
|
|
|
|
#include "math_support.h"
|
|
|
|
#include "math_mathmlstream.h"
|
|
|
|
#include "math_symbolinset.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathDiffInset::MathDiffInset()
|
|
|
|
: MathNestInset(1)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
MathInset * MathDiffInset::clone() const
|
|
|
|
{
|
|
|
|
return new MathDiffInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::addDer(MathArray const & der)
|
|
|
|
{
|
|
|
|
cells_.push_back(MathXArray());
|
2002-07-08 14:57:12 +00:00
|
|
|
cells_.back().data() = der;
|
2001-11-13 16:27:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::normalize(NormalStream & os) const
|
|
|
|
{
|
|
|
|
os << "[diff";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx)
|
|
|
|
os << ' ' << cell(idx);
|
|
|
|
os << ']';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathDiffInset::metrics(MathMetricsInfo &) const
|
2001-11-13 16:27:06 +00:00
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
void MathDiffInset::draw(MathPainterInfo &, int, int) const
|
2002-03-21 17:42:56 +00:00
|
|
|
{
|
2001-11-13 16:27:06 +00:00
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::maplize(MapleStream & os) const
|
|
|
|
{
|
|
|
|
os << "diff(";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ')';
|
|
|
|
}
|
|
|
|
|
2002-07-01 11:17:14 +00:00
|
|
|
void MathDiffInset::mathematicize(MathematicaStream & os) const
|
|
|
|
{
|
|
|
|
os << "Dt[";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ']';
|
|
|
|
}
|
|
|
|
|
2001-11-13 16:27:06 +00:00
|
|
|
|
|
|
|
void MathDiffInset::mathmlize(MathMLStream & os) const
|
|
|
|
{
|
|
|
|
os << "diff(";
|
|
|
|
for (idx_type idx = 0; idx < nargs(); ++idx) {
|
|
|
|
if (idx != 0)
|
|
|
|
os << ',';
|
|
|
|
os << cell(idx);
|
|
|
|
}
|
|
|
|
os << ')';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathDiffInset::write(WriteStream &) const
|
|
|
|
{
|
|
|
|
lyxerr << "should not happen\n";
|
|
|
|
}
|