]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracbase.C
some (yet unfinished) up/down work
[lyx.git] / src / mathed / math_fracbase.C
index ecc16c71d7ac66c0cccba9731adbe10f8952f9a4..f55f7fe8d402f212a06fe5c3b0b664607ea7b744 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "math_fracbase.h"
 #include "math_data.h"
+#include "cursor.h"
 
 
 MathFracbaseInset::MathFracbaseInset()
@@ -19,25 +20,24 @@ MathFracbaseInset::MathFracbaseInset()
 {}
 
 
-bool MathFracbaseInset::idxRight(BufferView &) const
+bool MathFracbaseInset::idxRight(LCursor &) const
 {
        return false;
 }
 
 
-bool MathFracbaseInset::idxLeft(BufferView &) const
+bool MathFracbaseInset::idxLeft(LCursor &) const
 {
        return false;
 }
 
 
-bool MathFracbaseInset::idxUpDown(BufferView & bv, bool up, int targetx) const
+bool MathFracbaseInset::idxUpDown(LCursor & cur, bool up) const
 {
-       CursorSlice & cur = cursorTip(bv);
        MathInset::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
        if (cur.idx() == target)
                return false;
        cur.idx() = target;
-       cur.pos() = cell(target).x2pos(targetx);
+       cur.pos() = cell(target).x2pos(cur.x_target());
        return true;
 }