]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.h
Show branches from master document in branch inset dialog
[lyx.git] / src / Undo.h
index dd7035816d9287a2cbbdee858c9943e0aa3fe5d2..fbfb9e7dbbb3dc40ef3ca1f2fd27725dec470ab1 100644 (file)
 namespace lyx {
 
 class Buffer;
-class BufferParams;
 class CursorData;
 class Inset;
-class MathData;
-class ParagraphList;
 
 /// This is used to combine consecutive undo recordings of the same kind.
 enum UndoKind {
@@ -96,6 +93,8 @@ public:
        void endUndoGroup();
        /// end the current undo group and set UndoElement::cur_after if necessary.
        void endUndoGroup(CursorData const & cur_after);
+       /// end abruptly the current group and create a new one wih the same nesting level
+       void splitUndoGroup(CursorData const & cur);
        /// return true if an undo group is open and contains at least one element
        bool activeUndoGroup() const;
 
@@ -131,19 +130,18 @@ private:
 
 /** Helper class to simplify the use of undo groups across several buffers.
  *
- *  The undo group is created when the object is instanciated; it is
- *  then ended as the object goes out of scope or the buffer is reset
- *  (see below)
+ *  The undo group is open when the object is instantiated or when
+ *  the buffer is reset; it is then ended as the object goes out of
+ *  scope (see below)
  */
 class UndoGroupHelper {
 public:
-       UndoGroupHelper(Buffer * buf = 0);
-
+       // Begin a new undo group for buffer \c buf.
+       UndoGroupHelper(Buffer * buf);
+       // End all active undo groups.
        ~UndoGroupHelper();
 
-       /** Close the current undo group if necessary and create a new one
-        * for buffer \c buf.
-        */
+       // Begin if needed an undo group for buffer \c buf.
        void resetBuffer(Buffer * buf);
 
 private: