Public Member Functions | Public Attributes

AppendGizmoRestore Class Reference

Search for all occurrences

Detailed Description

See also:
Class RestoreObj, Class Atmospheric, Class Effect, Class SpecialFX, Class INode.

Description:
This class is available in release 3.0 and later only.

This class enables implementing undo of Gizmo assignment in Atmosphere and Effects classes. This class provides implementations of the RestoreObj methods. An instance of this class can be put on the Hold stack when a Gizmo is appended. For example:
if (theHold.Holding())
    theHold.Put(new AppendGizmoRestore(this,node));
All methods of this class are implemented by the System.
Data Members:
SpecialFX *fx;

Points to the Atmosphere of Effect.

INode *node;

Points to the gizmo node.

#include <sfx.h>

Inheritance diagram for AppendGizmoRestore:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  AppendGizmoRestore (SpecialFX *f, INode *n)
void  Redo ()
void  Restore (int isUndo)
MSTR  Description ()

Public Attributes

SpecialFX fx
INode node

Constructor & Destructor Documentation

AppendGizmoRestore ( SpecialFX f,
INode n 
) [inline]
Remarks:
Constructor. The data members are initalized to the values pased.
{ fx= f; node = n; }

Member Function Documentation

void Redo ( ) [inline, virtual]
Remarks:
This method is called when the user selects the Redo command. The developer should restore the database to the state prior to the last Undo command.

Implements RestoreObj.

void Restore ( int  isUndo ) [inline, virtual]
Remarks:
The developer implements this method to restore the state of the database to as it was when theHold.Put() was called with this restore object.

Regardless of the value of the isUndo parameter, the method must restore the state of the scene to the one it was in when theHold.Put() was called with this restore object.

RestoreObj::Restore and RestoreObj::Redo may be called several times in a row: these methods must protect against any problems that may arise because of this, such as trying to undo multiple times in a row what has been undone already.
Parameters:
isUndo Nonzero if Restore() is being called in response to the Undo command; otherwise zero. If isUndo is nonzero, the developer needs to save whatever data they need to allow the user to redo the operation.

Implements RestoreObj.

{ fx->DeleteGizmo(fx->NumGizmos()-1); } 
MSTR Description ( ) [inline, virtual]
Remarks:
This method is used internally to 3ds Max in debugging only. It is used to display a symbolic name for the restore object.
Returns:
The name of the restore object.
Default Implementation:
{ return MSTR(_M("---")); }

Reimplemented from RestoreObj.

{ return MSTR("AppendGizmoRestore"); }

Member Data Documentation


AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore
AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore AppendGizmoRestore