#include <moldpers.h>
Inheritance diagram for RecordPerspectiveAction:
Public Member Functions | |
RecordPerspectiveAction () | |
Constructor for the action to undo Perspective modification. | |
~RecordPerspectiveAction () | |
Destructor for the action to undo Perspective modification. | |
virtual ActionCode | Execute () |
This is the virtual function that is called when the action is executed by the Undo/Redo system. This is the function that actually undoes the Perspective change action by swapping the current internal definition of the Perspective with the contexts of itself. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, MouldPerspective *pPerspective, Action **NewAction) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NORECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
Private Attributes | |
MouldPerspective * | pCPerspective |
POINT | RecordArray [4] |
class RecordPerspectiveAction : public Action
Definition at line 292 of file moldpers.h.
|
Constructor for the action to undo Perspective modification. RecordPerspectiveAction::RecordPerspectiveAction()
Definition at line 1513 of file moldpers.cpp. 01514 { 01515 pCPerspective=NULL; 01516 }
|
|
Destructor for the action to undo Perspective modification. RecordPerspectiveAction::~RecordPerspectiveAction()
Definition at line 1529 of file moldpers.cpp.
|
|
This is the virtual function that is called when the action is executed by the Undo/Redo system. This is the function that actually undoes the Perspective change action by swapping the current internal definition of the Perspective with the contexts of itself.
Reimplemented from Action. Definition at line 1608 of file moldpers.cpp. 01609 { 01610 // try to create a redo record 01611 RecordPerspectiveAction* EnvAction; 01612 ActionCode Act; 01613 Act = RecordPerspectiveAction::Init(pOperation, pOppositeActLst, pCPerspective, (Action**)(&EnvAction)); 01614 01615 // for undo, simply copy 'this' record over the shape. 01616 // No No , we dont need to check for AC_OK, hands off! we've done all that in the 01617 // init function which tries to record the current state of the Perspective 01618 if (pCPerspective) 01619 pCPerspective->BuildShape(RecordArray,NULL); 01620 01621 return Act; 01622 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NORECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 1564 of file moldpers.cpp. 01568 { 01569 ActionCode Ac = AC_FAIL; 01570 if (pPerspective!=NULL) 01571 { 01572 UINT32 ActSize = sizeof(RecordPerspectiveAction); 01573 Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(RecordPerspectiveAction), NewAction); 01574 if (Ac==AC_OK) 01575 { 01576 RecordPerspectiveAction* pAct = ((RecordPerspectiveAction*)*NewAction); 01577 if (pAct) 01578 { 01579 pAct->pCPerspective = pPerspective; 01580 pPerspective->Perspective.CopyShape(pAct->RecordArray); 01581 } 01582 } 01583 } 01584 return Ac; 01585 }
|
|
Definition at line 305 of file moldpers.h. |
|
Definition at line 306 of file moldpers.h. |