]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.h
Add FIXME
[lyx.git] / src / Cursor.h
index 1cd51c2d11a7f7fc229d55bbbdbe4de2dfd8538b..cc5e46e83b5315ca5114e28b161b721b6044c169 100644 (file)
@@ -101,11 +101,6 @@ protected:
        bool mark_;
        /// are we in word-selection mode? This is set when double clicking.
        bool word_selection_;
-       /// If true, we are behind the previous char, otherwise we are in front
-       // of the next char. This only make a difference when we are in front
-       // of a big inset spanning a whole row and computing coordinates for
-       // displaying the cursor.
-       bool logicalpos_;
 
 // FIXME: make them protected.
 public:
@@ -154,7 +149,10 @@ public:
        /// set the cursor data
        void setCursorData(CursorData const & data);
        /// sets cursor part
+       /// this (intentionally) does neither touch anchor nor selection status
        void setCursor(DocIterator const & it);
+       /// set the cursor to dit normalised against the anchor, and set selection.
+       void setCursorSelectionTo(DocIterator dit);
        /// sets the cursor to the normalized selection anchor
        void setCursorToAnchor();
 
@@ -166,8 +164,8 @@ public:
        //
        /// selection active?
        bool selection() const { return selection_; }
-       /// set selection;
-       void setSelection(bool sel) { selection_ = sel; }
+       /// set selection; this is lower level than (set|clear)Selection
+       void selection(bool sel) { selection_ = sel; }
        /// do we have a multicell selection?
        bool selIsMultiCell() const 
                { return selection_ && selBegin().idx() != selEnd().idx(); }
@@ -216,6 +214,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
@@ -294,10 +295,9 @@ public:
 
        /// access to normalized selection anchor
        CursorSlice normalAnchor() const;
-       // FIXME: this can't be a const & and a const function because
-       // LFUN_TAB_* wants to move the real anchor.
        /// access to real selection anchor
-       DocIterator & realAnchor();
+       DocIterator const & realAnchor() const { return anchor_; }
+       DocIterator & realAnchor() { return anchor_; }
        /// sets anchor to cursor position
        void resetAnchor();
        /// access to owning BufferView