#include <moldedit.h>
Inheritance diagram for RecordGeometryAction:
Public Member Functions | |
RecordGeometryAction () | |
RecordGeometryAction constructor. | |
~RecordGeometryAction () | |
virtual ActionCode | Execute () |
Executes the InvalidateRectAction which invalidates a rectangular region of the current document. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, NodeMould *const pMould, Action **NewAction) |
This simple action saves away the current mould space (geometry) defined by this mould object. The mould space may then be deleted externally and replaced with another. During undo the new space will be recorded and the old space rebuilt. | |
static ActionCode | DoRecord (Operation *const pOp, NodeMould *const pMould) |
This simple action saves away the current mould space (geometry) defined by this mould object. The mould space may then be deleted externally and replaced with another. During undo the new space will be recorded and the old space rebuilt. | |
Private Attributes | |
NodeMould * | pSavedMould |
MouldGeometry * | pSavedGeometry |
Definition at line 221 of file moldedit.h.
|
RecordGeometryAction constructor.
Definition at line 1130 of file moldedit.cpp. 01131 { 01132 pSavedMould=NULL; 01133 pSavedGeometry=NULL; 01134 }
|
|
Definition at line 1136 of file moldedit.cpp. 01137 { 01138 if (pSavedGeometry!=NULL) 01139 { 01140 delete pSavedGeometry; 01141 pSavedGeometry=NULL; 01142 } 01143 }
|
|
This simple action saves away the current mould space (geometry) defined by this mould object. The mould space may then be deleted externally and replaced with another. During undo the new space will be recorded and the old space rebuilt.
Definition at line 1165 of file moldedit.cpp. 01167 { 01168 ERROR2IF(pMould==NULL,AC_FAIL,"Mould pointer is NULL in RecordGeometryAction()"); 01169 RecordGeometryAction* GeomAction; 01170 // Attempt to initialise the next action 01171 return RecordGeometryAction::Init(pOp, pOp->GetUndoActionList(), pMould, (Action**)(&GeomAction)); 01172 }
|
|
Executes the InvalidateRectAction which invalidates a rectangular region of the current document.
Reimplemented from Action. Definition at line 1238 of file moldedit.cpp. 01239 { 01240 RecordGeometryAction* GeomAction; 01241 ActionCode Ac; 01242 // Attempt to initialise the next action 01243 Ac = RecordGeometryAction::Init(pOperation, pOppositeActLst, pSavedMould, (Action**)(&GeomAction)); 01244 01245 if (Ac!=AC_FAIL) 01246 { 01247 // set the geometry using this new mould shape 01248 if (!pSavedMould->SetGeometry(pSavedGeometry)) 01249 return AC_FAIL; 01250 01251 // Make sure the destructor doesn't vape it 01252 pSavedGeometry=NULL; 01253 } 01254 return Ac; 01255 }
|
|
This simple action saves away the current mould space (geometry) defined by this mould object. The mould space may then be deleted externally and replaced with another. During undo the new space will be recorded and the old space rebuilt.
Definition at line 1199 of file moldedit.cpp. 01203 { 01204 ERROR2IF(pMould==NULL,AC_FAIL,"Mould pointer is NULL in RecordGeometryAction()"); 01205 MouldGeometry* pGeometry = pMould->GetGeometry(); 01206 ERROR2IF(pGeometry==NULL, AC_FAIL, "There was no defined geometry in RecordGeometryAction"); 01207 01208 // find the size of the geometry we need to save 01209 ActionCode Ac = (Action::Init(pOp, 01210 pActionList, 01211 sizeof(RecordGeometryAction), 01212 CC_RUNTIME_CLASS(RecordGeometryAction), 01213 NewAction)); 01214 if (*NewAction != NULL) 01215 { 01216 ((RecordGeometryAction*)(*NewAction))->pSavedMould = pMould; 01217 ((RecordGeometryAction*)(*NewAction))->pSavedGeometry = pGeometry; 01218 } 01219 01220 return (Ac); 01221 }
|
|
Definition at line 240 of file moldedit.h. |
|
Definition at line 239 of file moldedit.h. |