]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.h
Fix bug 4166: Crash when middle button click on inset label
[lyx.git] / src / Cursor.h
index 1e9fc6d27f1e703338a1b2d8c9f03c63b54ff141..edb2f862ccccdce67427295326ce405639f80d8b 100644 (file)
@@ -71,6 +71,12 @@ public:
        bool selection() const { return selection_; }
        /// selection active?
        bool & selection() { return selection_; }
+       /// do we have a multicell selection?
+       bool selIsMultiCell() const 
+               { return selection_ && selBegin().idx() != selEnd().idx(); }
+       /// do we have a multiline selection?
+       bool selIsMultiLine() const 
+               { return selection_ && selBegin().pit() != selEnd().pit(); }
        /// did we place the anchor?
        bool mark() const { return mark_; }
        /// did we place the anchor?
@@ -122,6 +128,22 @@ public:
        bool posBackward();
        /// move one step forward
        bool posForward();
+       /// move visually one step to the right
+       /**
+        * @note: This method may move into an inset unless skip_inset == true.
+        * @note: This method may move into a new paragraph.
+        * @note: This method may move out of the current slice.
+        * @return: true if moved, false if not moved
+        */
+       bool posVisRight(bool skip_inset = false);
+       /// move visually one step to the left
+       /**
+        * @note: This method may move into an inset unless skip_inset == true.
+        * @note: This method may move into a new paragraph.
+        * @note: This method may move out of the current slice.
+        * @return: true if moved, false if not moved
+        */
+       bool posVisLeft(bool skip_inset = false);
        /// move visually to next/previous row
        /**
         * Assuming we were to keep moving left (right) from the current cursor