X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursor.h;h=bb789e3a4c516263dc8a7de1afdf9962e543c66a;hb=2455bc258f3b62c29ec4a41cb88070ff8518e842;hp=95cb4cc893f4f2ba4d3a5daa89fe82629a7829d5;hpb=11a6b3c4c7a031fd3776f53c9c43f62116933cea;p=lyx.git diff --git a/src/Cursor.h b/src/Cursor.h index 95cb4cc893..bb789e3a4c 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -122,6 +122,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 @@ -236,7 +252,7 @@ public: /// Convenience: prepare undo for the whole buffer void recordUndoFullDocument(); - /// Convenience: prepare undo for the selected paragraphs + /// Convenience: prepare undo for the selected paragraphs or cells void recordUndoSelection(); /// @@ -350,6 +366,8 @@ public: bool inMacroMode() const; /// get access to the macro we are currently typing InsetMathUnknown * activeMacro(); + /// get access to the macro we are currently typing + InsetMathUnknown const * activeMacro() const; /// replace selected stuff with at, placing the former // selection in given cell of atom @@ -396,7 +414,7 @@ public: * Sure that the cursor old is valid, i.e. all inset pointers * point to valid insets! Use Cursor::fixIfBroken if necessary. */ -bool notifyCursorLeaves(DocIterator const & old, Cursor & cur); +bool notifyCursorLeaves(Cursor const & old, Cursor & cur); } // namespace lyx