]> git.lyx.org Git - lyx.git/blobdiff - src/CursorSlice.h
Added Liviu Andronic, and modified generate_contributions.py to match what was in...
[lyx.git] / src / CursorSlice.h
index ebb695e4da7b5cbc68c898e852d08490a23355d4..981f59c47de361aa7fbd4a5a50bd968edbd14273 100644 (file)
 #define CURSORSLICE_H
 
 #include "support/types.h"
+#include "support/strfwd.h"
 #include "insets/Inset.h"
 
-#include <cstddef>
-#include <iosfwd>
-
 
 namespace lyx {
 
@@ -58,6 +56,15 @@ public:
        ///
        explicit CursorSlice(Inset &);
 
+       /// comparison operators.
+       //@{
+       friend bool operator==(CursorSlice const &, CursorSlice const &);
+       friend bool operator!=(CursorSlice const &, CursorSlice const &);
+       friend bool operator<(CursorSlice const &, CursorSlice const &);
+       friend bool operator>(CursorSlice const &, CursorSlice const &);
+       friend bool operator<=(CursorSlice const &, CursorSlice const &);
+       //@}
+
        /// the current inset
        Inset & inset() const { return *inset_; }
        /// return the cell this cursor is in
@@ -152,23 +159,10 @@ private:
        idx_type idx_;
        /// paragraph in this cell (used by texted)
        pit_type pit_;
-       /// true if 'pit' was properly initialized
-       bool pit_valid_;
        /// position in this cell
        pos_type pos_;
 };
 
-/// test for equality
-bool operator==(CursorSlice const &, CursorSlice const &);
-/// test for inequality
-bool operator!=(CursorSlice const &, CursorSlice const &);
-/// test for order
-bool operator<(CursorSlice const &, CursorSlice const &);
-/// test for order
-bool operator>(CursorSlice const &, CursorSlice const &);
-/// test for order
-bool operator<=(CursorSlice const &, CursorSlice const &);
-
 
 } // namespace lyx