49 #ifndef __UT_UndoManager__
50 #define __UT_UndoManager__
62 struct utClearerStruct;
63 struct utUndoInterestStruct;
79 static void disableUndoCreation();
80 static void enableUndoCreation();
87 int beginUndoBlock(
const char *
name,
95 int beginLastUndoBlock(
const char *name,
103 void endUndoBlock(
int level);
106 int willAcceptUndoAddition();
108 int performingUndoRedo();
120 void addToUndoBlock(
UT_Undo *undo);
123 void addToLastUndoBlock(
UT_Undo *undo);
127 void suspendTopLevelUndoBlock();
128 void resumeTopLevelUndoBlock();
129 bool isTopLevelUndoSuspended()
const;
143 void undo(
bool strict =
false,
bool redoable =
true);
144 void redo(
bool strict =
false);
147 const char *getUndoOperationName();
150 const char *getRedoOperationName();
163 void pruneInvalidUndos();
165 int64 getMemoryUsage();
174 void clearUndoFlags();
175 void installUndoFlagClearer(
void (*
function)(
void *
data),
177 void removeUndoFlagClearer(
void (*
function)(
void *
data),
183 void setUndoInterest(
void (*
function)(
void *
data),
190 void checkMemoryUsage();
191 void pruneUndoBlockStack();
192 void pruneRedoBlockStack();
203 utUndoInterestStruct *myInterest;
212 exint myLastSuspendId;
215 char myEnableBugNotify;
233 #define UT_UNDOBLOCK_ADOPT_NAME "Multiple Undo Operation"
UT_API UT_UndoManager * UTgetUndoManager()
int64 getMemoryUsageLimit()
UT_API int UTbeginUndoBlock(const char *name, UT_UndoBlockType blocktype, UT_UndoManager *man=0)
UT_API void UTendUndoBlock(int level, UT_UndoManager *man=0)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
UT_API int UTwillAcceptUndoAddition(UT_UndoManager *man=0)
#define SYS_NO_DISCARD_RESULT
UT_AutoUndoBlock(const char *name, UT_UndoBlockType blocktype)
GLuint const GLchar * name
UT_API int UTperformingUndoRedo(UT_UndoManager *man=0)
UT_API void UTaddToUndoBlock(UT_Undo *, UT_UndoManager *man=0)
const UT_UndoBlock * getUndoStack() const
const UT_UndoBlock * getRedoStack() const