Suspends various system states in an exception safe manner.
In certain cases, it is desirable to suspend animation, undo/redo, etc. while your plugin executes certain operations that should not create animation keys, be undo-able, etc. In these cases, create an instance of this class to suspend the desired system states. When the instance is destructed, the states will automatically be restored to their previous value, in a way that is safe in the presence of exceptions.
#include <ref.h>
Public Member Functions |
|
SuspendAll (BOOL holdState=FALSE, BOOL macroRecorder=FALSE, BOOL animateMode=FALSE, BOOL setKeyMode=FALSE, BOOL autoBackup=FALSE, BOOL saveRequired=FALSE, BOOL refMsgs=FALSE) | |
Constructor. |
|
void | Resume () |
Restores the suspended system states.
|
|
~SuspendAll () | |
Destructor - restores the suspended system
states. |
SuspendAll | ( | BOOL | holdState = FALSE , |
BOOL | macroRecorder =
FALSE , |
||
BOOL | animateMode =
FALSE , |
||
BOOL | setKeyMode =
FALSE , |
||
BOOL | autoBackup =
FALSE , |
||
BOOL | saveRequired =
FALSE , |
||
BOOL | refMsgs =
FALSE |
||
) |
Constructor.
Suspends all system states that are requested to be suspended
holdState | - If TRUE, disables the hold system (undo/redo), otherwise it's not changed. See theHold.Suspend() for more information. |
macroRecorder | - If TRUE, macro recording is suspended, otherwise it's not changed. See MacroRecorder::Disable() for more information. |
animateMode | - If TRUE, creating animation keys is suspended, otherwise it's not changed. See class AnimateSuspend for more information. |
setKeyMode | - If TRUE, "setkey" mode is suspended, otherwise it's not changed. See SuspendSetKeyMode() for more information. |
autoBackup | - If TRUE, auto-backup is suspended, otherwise it's not changed. See Interface::EnableAutoBackup() for more information. |
saveRequired | - If TRUE, backs up the "save required" flag, otherwise it doesn't. See IsSaveRequired() for more information. |
refMsgs | - If TRUE, passing of reference messages is suspended, otherwise it's not changed. See DisableRefMsgs() for more information. |
~SuspendAll | ( | ) | [inline] |
Destructor - restores the suspended system states.
{Resume ();}
void Resume | ( | ) |
Restores the suspended system states.