#include <config.h>
#include "InsetMathScript.h"
-#include "MathArray.h"
+#include "MathData.h"
#include "MathStream.h"
#include "MathSupport.h"
#include "InsetMathSymbol.h"
}
-auto_ptr<InsetBase> InsetMathScript::doClone() const
+auto_ptr<Inset> InsetMathScript::doClone() const
{
- return auto_ptr<InsetBase>(new InsetMathScript(*this));
+ return auto_ptr<Inset>(new InsetMathScript(*this));
}
}
-MathArray const & InsetMathScript::down() const
+MathData const & InsetMathScript::down() const
{
if (nargs() == 3)
return cell(2);
}
-MathArray & InsetMathScript::down()
+MathData & InsetMathScript::down()
{
if (nargs() == 3)
return cell(2);
}
-MathArray const & InsetMathScript::up() const
+MathData const & InsetMathScript::up() const
{
BOOST_ASSERT(nargs() > 1);
return cell(1);
}
-MathArray & InsetMathScript::up()
+MathData & InsetMathScript::up()
{
BOOST_ASSERT(nargs() > 1);
return cell(1);
{
if (nargs() == 1) {
// just nucleus so far
- cells_.push_back(MathArray());
+ cells_.push_back(MathData());
cell_1_is_up_ = up;
} else if (nargs() == 2 && !has(up)) {
if (up) {
cells_.push_back(cell(1));
cell(1).clear();
} else {
- cells_.push_back(MathArray());
+ cells_.push_back(MathData());
}
}
}
-MathArray const & InsetMathScript::nuc() const
+MathData const & InsetMathScript::nuc() const
{
return cell(0);
}
-MathArray & InsetMathScript::nuc()
+MathData & InsetMathScript::nuc()
{
return cell(0);
}
return true;
if (at->asFontInset()) {
- MathArray const & ar = at->asFontInset()->cell(0);
+ MathData const & ar = at->asFontInset()->cell(0);
for (size_t i = 0; i < ar.size(); ++i) {
if (!(ar[i]->asCharInset() ||
(ar[i]->asSymbolInset() &&
else {
nuc().setXY(*pi.base.bv, x + dxx(), y);
if (editing(pi.base.bv))
- pi.draw(x + dxx(), y, char_type('.'));
+ pi.draw(x + dxx(), y, char_type('.'));
}
ScriptChanger dummy(pi.base);
if (hasUp())
}
-InsetBase::idx_type InsetMathScript::idxOfScript(bool up) const
+Inset::idx_type InsetMathScript::idxOfScript(bool up) const
{
if (nargs() == 1)
return 0;
}
// Are we 'up'?
- if (has(up) && cur.idx() == idxOfScript(true)) {
+ if (cur.idx() == idxOfScript(true)) {
// can't go further up
if (up)
return false;
}
// Are we 'down'?
- if (has(up) && cur.idx() == idxOfScript(false)) {
+ if (cur.idx() == idxOfScript(false)) {
// can't go further down
if (!up)
return false;
// invoke notifyCursorLeaves again and does not touch
// cur (since the top slice will be deleted
// afterwards))
- MathArray ar = cell(0);
+ MathData ar = cell(0);
Cursor tmpcur = cur;
tmpcur.pop();
tmpcur.cell().erase(tmpcur.pos());