1 #include "math_exintinset.h"
2 #include "math_support.h"
3 #include "math_mathmlstream.h"
4 #include "math_symbolinset.h"
8 MathExIntInset::MathExIntInset(string const & name)
9 : MathNestInset(2), symbol_(name), scripts_(new MathScriptInset)
13 MathInset * MathExIntInset::clone() const
15 return new MathExIntInset(*this);
19 void MathExIntInset::scripts(MathAtom const & at)
25 MathAtom & MathExIntInset::scripts()
31 void MathExIntInset::symbol(string const & symbol)
37 bool MathExIntInset::hasScripts() const
39 // take empty upper bound as "no scripts"
40 return !scripts_->asScriptInset()->up().data_.empty();
45 void MathExIntInset::normalize(NormalStream & os) const
47 os << '[' << symbol_.c_str() << ' ' << cell(0) << ' ' << cell(1);
49 os << ' ' << scripts_.nucleus();
54 void MathExIntInset::metrics(MathMetricsInfo const &) const
56 lyxerr << "should not happen\n";
60 void MathExIntInset::draw(Painter &, int, int) const
62 lyxerr << "should not happen\n";
66 void MathExIntInset::maplize(MapleStream & os) const
68 os << symbol_.c_str() << '(';
75 MathScriptInset * p = scripts_->asScriptInset();
76 os << '=' << p->down().data_ << ".." << p->up().data_;
82 void MathExIntInset::mathmlize(MathMLStream & os) const
84 MathSymbolInset * sym = new MathSymbolInset(symbol_.c_str());
86 scripts_->asScriptInset()->mathmlize(sym, os);
90 os << cell(0) << "<mo> ⁢ </mo>"
91 << MTag("mrow") << "<mo> ⅆ </mo>"
92 << cell(1) << ETag("mrow");
96 void MathExIntInset::write(WriteStream &) const
98 lyxerr << "should not happen\n";