#include <opliveeffects.h>
Inheritance diagram for MarkEditListAction:
Public Member Functions | |
MarkEditListAction () | |
| |
~MarkEditListAction () | |
virtual ActionCode | Execute () |
Inserts the floating endpoint into the Line Tool, creating an undo action to remove the endpoint. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, 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_NO_RECORD 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. | |
static ActionCode | DoMarkEditList (Operation *pOp, ActionList *pActionList, EffectsStack *pPPStack, INT32 iStackPos) |
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list. | |
Public Attributes | |
IXMLDOMDocumentPtr | pEditList |
INT32 | iStackPos |
Definition at line 706 of file opliveeffects.h.
|
Definition at line 4607 of file opliveeffects.cpp.
|
|
Definition at line 4770 of file opliveeffects.cpp.
|
|
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list.
Definition at line 4672 of file opliveeffects.cpp. 04677 { 04678 ERROR2IF(iStackPos<0, AC_FAIL, "Bad stack pos in DoMarkEditList"); 04679 04680 MarkEditListAction* RecAction = NULL; 04681 ActionCode Act = MarkEditListAction::Init(pOp, pActionList, (Action**)&RecAction); 04682 if ( (Act == AC_OK) && (RecAction != NULL) ) 04683 { 04684 PPStackLevel* pLevel = (PPStackLevel*)pPPStack->FindItem(iStackPos); 04685 if (pLevel && pLevel->pPPNode && pLevel->pPPNode->IsBitmapEffect()) 04686 { 04687 RecAction->pEditList = CXMLUtils::NewDocument(((NodeBitmapEffect*)pLevel->pPPNode)->GetEditList()); 04688 RecAction->iStackPos = iStackPos; 04689 } 04690 else 04691 return AC_FAIL; 04692 } 04693 return Act; 04694 }
|
|
Inserts the floating endpoint into the Line Tool, creating an undo action to remove the endpoint.
Reimplemented from Action. Definition at line 4713 of file opliveeffects.cpp. 04714 { 04715 ERROR2IF(this->iStackPos<0, AC_FAIL, "Bad stack pos in MarkEditListAction::Execute"); 04716 04717 MarkEditListAction* ReAction = NULL; 04718 ActionCode Act = AC_FAIL; 04719 04720 // Create a redo action for this action, which is another MarkEditListAction 04721 Act = MarkEditListAction::Init(pOperation, 04722 pOppositeActLst, 04723 (Action**)(&ReAction)); 04724 if (Act == AC_FAIL) 04725 return AC_FAIL; 04726 04727 // --------------------------------------------------- 04728 // Record the current edit list in the Action? 04729 EffectsStack* pPPStack = EffectsStack::GetEffectsStackFromSelection(); 04730 if (pPPStack==NULL) 04731 return AC_FAIL; 04732 04733 PPStackLevel* pLevel = (PPStackLevel*)pPPStack->FindItem(this->iStackPos); 04734 if (pLevel && pLevel->pPPNode && pLevel->pPPNode->IsBitmapEffect()) 04735 { 04736 ReAction->pEditList = CXMLUtils::NewDocument(((NodeBitmapEffect*)pLevel->pPPNode)->GetEditList()); 04737 ReAction->iStackPos = this->iStackPos; 04738 } 04739 else 04740 { 04741 ReAction->pEditList = CXMLUtils::NewDocument(this->pEditList); 04742 ReAction->iStackPos = this->iStackPos; 04743 } 04744 04745 // --------------------------------------------------- 04746 // Now do the actual action 04747 // Run through the selection, setting edit lists on LiveEffects 04748 Node* pNode = NULL; 04749 if (pLevel) pNode = pLevel->listSelNodes.FindFirst(); 04750 while (pNode) 04751 { 04752 if (pNode->IsBitmapEffect()) 04753 { 04754 NodeBitmapEffect* pLE = (NodeBitmapEffect*)pNode; 04755 pLE->SetProcessedBitmap(NULL, NULL, DocRect(), 0, 0, 0, 0); // Remove cached bitmap to be sure 04756 pLE->SetEditList(CXMLUtils::NewDocument(this->pEditList)); 04757 } 04758 else 04759 return AC_FAIL; 04760 04761 pNode = pLevel->listSelNodes.FindNext(pNode); 04762 } 04763 04764 delete pPPStack; 04765 pPPStack = NULL; 04766 04767 return Act; 04768 }
|
|
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_NO_RECORD 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 4639 of file opliveeffects.cpp. 04642 { 04643 UINT32 ActSize = sizeof(MarkEditListAction); 04644 04645 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(MarkEditListAction), NewAction); 04646 04647 return Ac; 04648 }
|
|
Definition at line 725 of file opliveeffects.h. |
|
Definition at line 724 of file opliveeffects.h. |