Detailed Description
- See also:
- Class RestoreObj, Undo
and Redo.
- Description:
- The undo / redo system of 3ds Max uses a global instance of
this class called theHold. Developers call methods of
theHold object to participate in the undo / redo
system.
#include <hold.h>
List of all members.
Member Enumeration Documentation
anonymous enum [protected] |
- Enumerator:
-
kInRestore |
|
kInUndo |
|
kInRedo |
|
Constructor & Destructor Documentation
Member Function Documentation
- Parameters:
-
rob |
The restore object to register. |
- Example:
- Example code from EDMREST.CPP
if ( theHold.Holding() ) {
theHold.Put(new MeshSelectRestore(meshData,this));
}
CoreExport void Begin |
( |
|
) |
|
- Example:
- theHold.Begin();
CoreExport void Suspend |
( |
|
) |
|
CoreExport int IsSuspended |
( |
|
) |
|
CoreExport void Resume |
( |
|
) |
|
CoreExport int Holding |
( |
|
) |
|
- Returns:
- Nonzero if theHold is holding; otherwise 0.
- Example:
-
CoreExport int Restoring |
( |
int & |
isUndo |
) |
|
- Parameters:
-
isUndo |
This parameter is updated to indicate if the restore is coming
from an undo. It's assigned nonzero if it is; zero if not. |
CoreExport int Redoing |
( |
|
) |
|
CoreExport int RestoreOrRedoing |
( |
|
) |
|
CoreExport void DisableUndo |
( |
|
) |
|
CoreExport void EnableUndo |
( |
|
) |
|
CoreExport BOOL IsUndoDisabled |
( |
|
) |
|
CoreExport int GetBeginDepth |
( |
|
) |
|
CoreExport void Restore |
( |
|
) |
|
CoreExport void Release |
( |
|
) |
|
CoreExport void Accept |
( |
int |
nameID |
) |
|
- Parameters:
-
nameID |
The resource ID of the string to appear in the Edit menu next
to Undo or Redo. |
- Example:
- theHold.Accept(IDS_MOVE);
CoreExport void Accept |
( |
MCHAR * |
name |
) |
|
- Parameters:
-
name |
The string to appear in the Edit menu next to Undo or
Redo. |
CoreExport void Cancel |
( |
|
) |
|
CoreExport void SuperBegin |
( |
|
) |
|
- Sample Code:
- See the sample program
/MAXSDK/SAMPLES/OBJECTS/BONES.CPP.
CoreExport void SuperAccept |
( |
int |
nameID |
) |
|
- Parameters:
-
nameID |
The resource ID of the string to appear in the Edit menu next
to Undo or Redo. |
- Sample Code:
- See the sample program
/MAXSDK/SAMPLES/OBJECTS/BONES.CPP.
CoreExport void SuperAccept |
( |
MCHAR * |
name |
) |
|
- Parameters:
-
name |
The string to appear in the Edit menu next to Undo or
Redo. |
CoreExport void SuperCancel |
( |
|
) |
|
- Sample Code:
- See the sample program
/MAXSDK/SAMPLES/OBJECTS/BONES.CPP.
CoreExport int GetSuperBeginDepth |
( |
|
) |
|
CoreExport int GetGlobalPutCount |
( |
|
) |
|
CoreExport INT_PTR Execute |
( |
int |
cmd, |
|
|
ULONG_PTR |
arg1 = 0 , |
|
|
ULONG_PTR |
arg2 = 0 , |
|
|
ULONG_PTR |
arg3 = 0 |
|
) |
|
|
CoreExport DWORD_PTR Size |
( |
|
) |
const |
Returns the (approximate) memory usage of this hold.
The memory returned is the sum of all RestoreObj's Size()
methods, so the accuracy of this method depends on the accuracy of
the restore objects.
- See also:
- RestoreObj::Size
- Returns:
- Size, in bytes, of the restore objects held by this hold.
!
Member Data Documentation
unsigned flags
[protected] |