]> git.lyx.org Git - lyx.git/blobdiff - src/CursorSlice.h
rev 19644: I forgot this.
[lyx.git] / src / CursorSlice.h
index cdd13ecec0124ac7275f607a07e88ee645540339..98d054dc4e23ea17c50e97202216212ed37e09d8 100644 (file)
@@ -20,9 +20,6 @@
 #include "support/types.h"
 #include "insets/Inset.h"
 
-#include <boost/signal.hpp>
-#include <boost/signals/trackable.hpp>
-
 #include <cstddef>
 #include <iosfwd>
 
@@ -41,7 +38,7 @@ class Paragraph;
 // that of MathData and Text should vanish. They are conceptually the
 // same (now...)
 
-class CursorSlice : public boost::signals::trackable {
+class CursorSlice {
 public:
        /// Those needs inset_ access.
        ///@{
@@ -59,13 +56,7 @@ public:
        ///
        CursorSlice();
        ///
-       CursorSlice(CursorSlice const &);
-       ///
        explicit CursorSlice(Inset &);
-       ///
-       CursorSlice & operator=(CursorSlice const &);
-       ///
-       bool isValid() const;
 
        /// the current inset
        Inset & inset() const { return *inset_; }
@@ -79,6 +70,8 @@ public:
        pit_type pit() const { return pit_; }
        /// set the offset of the paragraph this cursor is in
        pit_type & pit() { return pit_; }
+       /// return the last paragraph offset within the ParagraphList
+       pit_type lastpit() const;
        /// increments the paragraph this cursor is in
        void incrementPar();
        /// decrements the paragraph this cursor is in
@@ -128,9 +121,16 @@ public:
 
        /// write some debug information to \p os
        friend std::ostream & operator<<(std::ostream &, CursorSlice const &);
+       /// move to next position
+       void forwardPos();
+       /// move to previous position
+       void backwardPos();
+       /// are we at the end of this slice
+       bool at_end() const;
+       /// are we at the start of this slice
+       bool at_begin() const;
+       
 private:
-       ///
-       void invalidate();
 
        /// pointer to 'owning' inset. This is some kind of cache.
        Inset * inset_;