]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_cursor.h
fix cursor positioning using the mouse
[lyx.git] / src / mathed / math_cursor.h
index 90519bec17aa0cd1327c11cf083eac80e7adf45b..34f93337891f9851ef2ed385b9fc0977e621b927 100644 (file)
@@ -24,6 +24,7 @@
 #include "math_defs.h"
 
 class MathInset;
+class MathAtom;
 class MathArrayInset;
 class MathFuncInset;
 class MathMatrixInset;
@@ -73,9 +74,9 @@ public:
        ///
        void backspace();
        ///
-       void home();
+       void home(bool sel = false);
        ///
-       void end();
+       void end(bool sel = false);
        ///
        bool right(bool sel = false);
        ///
@@ -204,6 +205,14 @@ public:
        MathArray & array() const;
        ///
        MathXArray & xarray() const;
+       ///
+       MathAtom const * prevAtom() const;
+       ///
+       MathAtom * prevAtom();
+       ///
+       MathAtom const * nextAtom() const;
+       ///
+       MathAtom * nextAtom();
 
        /// returns the selection
        void getSelection(MathCursorPos &, MathCursorPos &) const;
@@ -250,7 +259,7 @@ private:
        /// can we enter the inset? 
        bool openable(MathInset *, bool selection) const;
        /// can the setPos routine enter that inset?
-       bool positionable(MathInset *, bool selection) const;
+       MathInset * positionable(MathAtom *, int x, int y) const;
        /// write access to cursor cell position
        int & pos();
        /// write access to cursor cell index