]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.h
SCons: msvc does not need this /TP option any more after we rename .C => .cpp. Also...
[lyx.git] / src / DocIterator.h
index d977ea852e4402e94b686d44f40201c24b577b34..55377754928ee8db9c12889047de225210963f3a 100644 (file)
@@ -155,8 +155,13 @@ public:
        //
        /// the paragraph we're in
        Paragraph & paragraph();
-       /// the paragraph we're in
+       /// the paragraph we're in in text mode.
+       /// \warning only works within text!
        Paragraph const & paragraph() const;
+       /// the paragraph we're in in any case.
+       /// This method will give the containing paragraph if
+       /// in not in text mode (ex: in mathed).
+       Paragraph const & innerParagraph() const;
        ///
        Text * text();
        ///
@@ -173,8 +178,6 @@ public:
        //
        // elementary moving
        //
-       /// move on one logical position, do not descend into nested insets
-       void forwardPosNoDescend();
        /**
         * move on one logical position, descend into nested insets
         * skip collapsed insets if \p ignorecollapsed is true
@@ -208,6 +211,9 @@ public:
        operator<<(std::ostream & os, DocIterator const & cur);
        ///
        friend bool operator==(DocIterator const &, DocIterator const &);
+       friend bool operator<(DocIterator const &, DocIterator const &);
+       friend bool operator>(DocIterator const &, DocIterator const &);
+       friend bool operator<=(DocIterator const &, DocIterator const &);
        ///
        friend class StableDocIterator;
 //protected:
@@ -219,6 +225,9 @@ public:
        void pop_back() { slices_.pop_back(); }
        /// recompute the inset parts of the cursor from the document data
        void updateInsets(Inset * inset);
+       /// fix DocIterator in circumstances that should never happen.
+       /// \return true if the DocIterator was fixed.
+       bool fixIfBroken();
 
 private:
        /**