+/**
+ * This class describes the position of a cursor within a document,
+ * but does not contain any detail about the view. It is currently
+ * only used to save cursor position in Undo, but culd be extended to
+ * handle the methods that only need this data.
+ **/
+class CursorData : public DocIterator
+{
+public:
+ ///
+ CursorData();
+ ///
+ explicit CursorData(Buffer * buffer);
+ ///
+ explicit CursorData(DocIterator const & dit);
+protected:
+ /// the anchor position
+ DocIterator anchor_;
+ ///
+ mutable DispatchResult disp_;
+ /// do we have a selection?
+ bool selection_;
+ /// are we on the way to get one?
+ 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:
+ /// the current font settings
+ Font current_font;
+ /// the current font
+ Font real_current_font;
+
+protected:
+
+ //
+ // math specific stuff that could be promoted to "global" later
+ //
+ /// do we allow autocorrection
+ bool autocorrect_;
+ /// are we entering a macro name?
+ bool macromode_;
+};
+