+bool InsetMathStackrel::idxUpDown(Cursor & cur, bool up) const
+{
+ idx_type const npos = 1234; // impossible number
+ idx_type target = npos;
+ if (up) {
+ idx_type const targets[] = { 1, npos, 0 };
+ target = targets[cur.idx()];
+ } else {
+ idx_type const targets[] = { 2, 0, npos };
+ target = targets[cur.idx()];
+ }
+
+ if (target == npos || target == nargs())
+ return false;
+ cur.idx() = target;
+ cur.pos() = cell(target).x2pos(&cur.bv(), cur.x_target());
+ return true;
+}
+
+
+bool InsetMathStackrel::idxFirst(Cursor & cur) const
+{
+ LASSERT(&cur.inset() == this, return false);
+ cur.idx() = 0;
+ cur.pos() = 0;
+ return true;
+}
+
+
+bool InsetMathStackrel::idxLast(Cursor & cur) const
+{
+ LASSERT(&cur.inset() == this, return false);
+ cur.idx() = 0;
+ cur.pos() = cur.lastpos();
+ return true;
+}
+
+
+MathClass InsetMathStackrel::mathClass() const
+{
+ // FIXME: update this when/if \stackbin is supported
+ return MC_REL;
+}
+
+