#include <becomea.h>
Inheritance diagram for CopyBecomeA:
Public Member Functions | |
CopyBecomeA (BecomeAReason Reason, CCRuntimeClass *pClass, UndoableOperation *pOp) | |
virtual BOOL | PassBack (NodeRenderableInk *pNewNode, NodeRenderableInk *pCreatedByNode, CCAttrMap *pAttrMap) |
This is the func that receives the NodePaths generated by the last node asked to do becomea, it is a helper function associated with CopyChildrenAsShapes. | |
void | SetContextNode (Node *pNode) |
Private Member Functions | |
CC_DECLARE_MEMDUMP (CopyBecomeA) | |
Private Attributes | |
Node * | pContextNode |
Definition at line 285 of file becomea.h.
|
Definition at line 290 of file becomea.h. 00292 : BecomeA(Reason,pClass,pOp) {pContextNode=NULL;}
|
|
|
|
This is the func that receives the NodePaths generated by the last node asked to do becomea, it is a helper function associated with CopyChildrenAsShapes.
Reimplemented from BecomeA. Definition at line 4515 of file noderend.cpp. 04516 { 04517 ERROR2IF(pNewNode==NULL,FALSE,"pNewNode==NULL"); 04518 ERROR2IF(pCreatedByNode==NULL,FALSE,"pCreateByNode==NULL"); 04519 ERROR2IF(pContextNode == NULL,FALSE,"The context node is NULL!!!"); 04520 04521 // Insert the new NodePath into the tree 04522 pNewNode->AttachNode(pContextNode,LASTCHILD); 04523 04524 if (pAttrMap!=NULL) 04525 { 04526 // Apply all the attributes to the new path 04527 BOOL ok = pNewNode->ApplyAttributes(pAttrMap); 04528 04529 /* 04530 // iterating all (key, value) pairs 04531 for (CCAttrMap::iterator Pos = pAttrMap->GetStartPosition(); Pos != NULL;) 04532 { 04533 void *pType, *pVal; 04534 pAttrMap->GetNextAssoc(Pos,pType,pVal); 04535 NodeAttribute* pNodeAttr = (NodeAttribute *)pVal; 04536 delete pNodeAttr; 04537 } 04538 */ 04539 pAttrMap->DeleteAttributes(); // Delete the returned attrs, they're not needed 04540 delete pAttrMap; 04541 return ok; 04542 } 04543 else 04544 { 04545 // We need to get the attributes from the creater node. 04546 CCAttrMap AppliedAtts(30); 04547 if (!pCreatedByNode->FindAppliedAttributes(&AppliedAtts)) 04548 return FALSE; 04549 04550 if (!pNewNode->ApplyAttributes(&AppliedAtts)) 04551 return FALSE; 04552 } 04553 04554 return TRUE; 04555 }
|
|
Definition at line 299 of file becomea.h. 00299 { pContextNode = pNode; }
|
|
|