]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.h
Remove unused Counters::copy
[lyx.git] / src / DocIterator.h
index 0653de86e950b7f20286b5e8d5e9539ff4a1062c..ca687570f9623c7508ab362b1641629a5c1ccbed 100644 (file)
@@ -15,7 +15,7 @@
 #include "CursorSlice.h"
 
 #include <vector>
-#include <algorithm>
+#include <algorithm> // std::min in MSVC 2017
 
 namespace lyx {
 
@@ -34,14 +34,6 @@ DocIterator doc_iterator_end(Buffer const * buf, Inset const * inset = 0);
 
 class DocIterator
 {
-public:
-       /// type for cell number in inset
-       typedef CursorSlice::idx_type idx_type;
-       /// type for row indices
-       typedef CursorSlice::row_type row_type;
-       /// type for col indices
-       typedef CursorSlice::col_type col_type;
-
 public:
        ///
        DocIterator();
@@ -69,10 +61,10 @@ public:
 
        /// does this iterator have any content?
        bool empty() const { return slices_.empty(); }
+       /// is this the begin position?
+       bool atBegin() const { return depth() == 1 && pit() == 0 && pos() == 0; }
        /// is this the end position?
        bool atEnd() const { return slices_.empty(); }
-       /// is this the last possible position?
-       bool atLastPos() const { return pit() == lastpit() && pos() == lastpos(); }
 
        /// checks the cursor slices for disabled spell checker insets
        bool allowSpellCheck() const;
@@ -212,6 +204,8 @@ public:
        void forwardInset();
        /// move backward one logical position
        void backwardPos();
+       /// move backward one logical position, skip collapsed insets
+       void backwardPosIgnoreCollapsed();
        /// move backward one physical character or inset
        void backwardChar();
        /// move backward one paragraph