]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_cursor.h
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_cursor.h
index 4ba59767445f8ab21b037d8fa69ae14d28364214..ef9172a0ad87f3a8394fc03a8d6b6fa7584f96a3 100644 (file)
@@ -102,8 +102,8 @@ public:
        void setPos(int x, int y);
        /// in pixels from top of screen
        void getPos(int & x, int & y);
-       /// 
-       MathAtom & par() const;
+       /// current inset
+       MathInset * par() const;
        /// return the next enclosing grid inset and the cursor's index in it
        MathGridInset * enclosingGrid(idx_type &) const;
        ///
@@ -115,6 +115,8 @@ public:
        /// size of current cell
        size_type size() const;
        ///
+       bool script(bool);
+       ///
        bool interpret(string const &);
        ///
        bool interpret(char);
@@ -174,9 +176,13 @@ public:
        col_type hullCol() const;
        ///
        row_type hullRow() const;
+       ///
+       col_type gridCol() const;
+       ///
+       row_type gridRow() const;
 
        /// make sure cursor position is valid
-       void normalize() const;
+       void normalize();
        ///
        UpdatableInset * asHyperActiveInset() const;
 
@@ -216,7 +222,7 @@ public:
        /// path of positions the cursor had to go if it were leving each inset
        cursor_type Cursor_;
        /// path of positions the anchor had to go if it were leving each inset
-       cursor_type Anchor_;
+       mutable cursor_type Anchor_;
 
        /// reference to the last item of the path, i.e. "The Cursor"
        MathCursorPos & cursor();
@@ -229,6 +235,8 @@ public:
        void dump(char const * str) const;
        ///
        void stripFromLastEqualSign();
+       /// moves on 
+       void setSelection(cursor_type const & where, size_type n);
 
        ///
        friend class Selection;
@@ -242,12 +250,10 @@ private:
        bool idxLeft();
        /// moves cursor index one cell to the right
        bool idxRight();
-       /// moves position somehow up
-       bool goUp();
-       /// moves position somehow down
-       bool goDown();
+       /// moves position somehow up or down
+       bool goUpDown(bool up);
        /// moves position into box
-       bool bruteFind(int xlow, int xhigh, int ylow, int yhigh);
+       bool bruteFind(int xo, int yo, int xlow, int xhigh, int ylow, int yhigh);
 
        ///
        string macroName() const;