X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursor.h;h=a0f5ec14bf14f4ac434163f7690f6e264bbe17b6;hb=8fd223146b02c83fbe78ff361590c9578a7d0454;hp=4ca5f3108d928f66e88a0c43520334b26172c243;hpb=96692bdbb0189b71803e83dbb18a2e3f006e7bf5;p=lyx.git diff --git a/src/Cursor.h b/src/Cursor.h index 4ca5f3108d..a0f5ec14bf 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -95,8 +95,6 @@ public: protected: /// the anchor position DocIterator anchor_; - /// - mutable DispatchResult disp_; /// do we have a selection? bool selection_; /// are we on the way to get one? @@ -218,6 +216,9 @@ public: bool macromode() const { return macromode_; } /// are we entering a macro name? bool & macromode() { return macromode_; } + + /// returns true when all insets in cursor stack are in cache + bool inCoordCache() const; /// returns x,y position void getPos(int & x, int & y) const; /// return logical positions between which the cursor is situated @@ -225,7 +226,7 @@ public: * If the cursor is at the edge of a row, the position which is "over the * edge" will be returned as -1. */ - void getSurroundingPos(pos_type & left_pos, pos_type & right_pos); + void getSurroundingPos(pos_type & left_pos, pos_type & right_pos) const; /// the row in the paragraph we're in Row const & textRow() const; @@ -538,10 +539,11 @@ public: /** - * Notifies all insets which appear in old, but not in cur. And then - * notify all insets which appear in cur, but not in old. - * Make sure that the cursor old is valid, i.e. all inset pointers - * point to valid insets! Use Cursor::fixIfBroken if necessary. + * Notifies all insets which appear in \c old, but not in \c cur. And then + * notify all insets which appear in \c cur, but not in \c old. + * \returns true if cursor is now invalid, e.g. if some insets in + * higher cursor slices of \c old do not exist anymore. In this case + * it may be necessary to use Use Cursor::fixIfBroken. */ bool notifyCursorLeavesOrEnters(Cursor const & old, Cursor & cur);