]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.h
Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
[lyx.git] / src / Cursor.h
index 27f2174d3c4dafade8277518d98e9a0121423ba8..1ee104cd52b8a6a9fcbcdb9d10c62c4315325b99 100644 (file)
@@ -15,8 +15,8 @@
 #include "DispatchResult.h"
 #include "DocIterator.h"
 #include "Font.h"
+#include "Undo.h"
 
-#include <iosfwd>
 #include <vector>
 
 
@@ -189,6 +189,33 @@ public:
        /// output
        friend std::ostream & operator<<(std::ostream & os, Cursor const & cur);
 
+       ///
+       bool textUndo();
+       ///
+       bool textRedo();
+
+       /// makes sure the next operation will be stored
+       void finishUndo();
+
+       /// The general case: prepare undo for an arbitrary range.
+       void recordUndo(UndoKind kind, pit_type from, pit_type to);
+
+       /// Convenience: prepare undo for the range between 'from' and cursor.
+       void recordUndo(UndoKind kind, pit_type from);
+
+       /// Convenience: prepare undo for the single paragraph or cell
+       /// containing the cursor
+       void recordUndo(UndoKind kind = ATOMIC_UNDO);
+
+       /// Convenience: prepare undo for the inset containing the cursor
+       void recordUndoInset(UndoKind kind = ATOMIC_UNDO);
+
+       /// Convenience: prepare undo for the whole buffer
+       void recordUndoFullDocument();
+
+       /// Convenience: prepare undo for the selected paragraphs
+       void recordUndoSelection();
+
 public:
        ///
        BufferView * bv_;