]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.h
Proper logos with RTL
[lyx.git] / src / Undo.h
index 59f3ca44fc93a58975ee459ffc9440e5889a5ac1..6f6cca6e90e968ee46c87d591a27fe97f82fd0a4 100644 (file)
@@ -96,6 +96,8 @@ public:
        void endUndoGroup();
        /// end the current undo group and set UndoElement::cur_after if necessary.
        void endUndoGroup(CursorData const & cur_after);
+       /// return true if an undo group is open and contains at least one element
+       bool activeUndoGroup() const;
 
        /// The general case: record undo information for an arbitrary range.
        /**
@@ -135,15 +137,9 @@ private:
  */
 class UndoGroupHelper {
 public:
-       UndoGroupHelper(Buffer * buf) : buffer_(0)
-       {
-               resetBuffer(buf);
-       }
+       UndoGroupHelper(Buffer * buf = 0);
 
-       ~UndoGroupHelper()
-       {
-               resetBuffer(0);
-       }
+       ~UndoGroupHelper();
 
        /** Close the current undo group if necessary and create a new one
         * for buffer \c buf.
@@ -151,7 +147,8 @@ public:
        void resetBuffer(Buffer * buf);
 
 private:
-       Buffer * buffer_;
+       class Impl;
+       Impl * const d;
 };