RemapBlendAction Class Reference

An action which undoes the remapping of a blend. More...

#include <blndtool.h>

Inheritance diagram for RemapBlendAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 RemapBlendAction ()
 Constructor for the action.
 ~RemapBlendAction ()
virtual ActionCode Execute ()
 Executes the action. This remaps the blend node using the inverse mapping indexes it was initialised with, creating another RemapBlendAction to invert this mapping.

Static Public Member Functions

static ActionCode Init (Operation *pOp, ActionList *pActionList, NodeBlend *pNodeBlend, UINT32 RemapRef, DocCoord PosStart, DocCoord PosEnd, RemapBlendAction **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.

Protected Attributes

NodeBlendpNodeBlend
UINT32 RemapRef
DocCoord InvPosStart
DocCoord InvPosEnd

Detailed Description

An action which undoes the remapping of a blend.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/94
See also:
-

Definition at line 726 of file blndtool.h.


Constructor & Destructor Documentation

RemapBlendAction::RemapBlendAction  ) 
 

Constructor for the action.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 6945 of file blndtool.cpp.

06946 {
06947     pNodeBlend      = NULL;
06948     RemapRef        = 0;
06949 }

RemapBlendAction::~RemapBlendAction  ) 
 

Definition at line 7055 of file blndtool.cpp.

07056 {
07057 }


Member Function Documentation

ActionCode RemapBlendAction::Execute  )  [virtual]
 

Executes the action. This remaps the blend node using the inverse mapping indexes it was initialised with, creating another RemapBlendAction to invert this mapping.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
ActionCode, one of AC_OK, AC_NO_RECORD or AC_FAIL

Errors: -

See also:
Action::Init()

Reimplemented from Action.

Definition at line 7040 of file blndtool.cpp.

07041 {
07042     ActionCode Act;
07043     RemapBlendAction* pAction;
07044     Act = RemapBlendAction::Init(   pOperation, 
07045                                     pOppositeActLst,
07046                                     pNodeBlend,
07047                                     RemapRef,
07048                                     InvPosStart,
07049                                     InvPosEnd,
07050                                     &pAction);
07051 
07052     return Act;
07053 }

ActionCode RemapBlendAction::Init Operation pOp,
ActionList pActionList,
NodeBlend pNodeBlend,
UINT32  RemapRef,
DocCoord  PosStart,
DocCoord  PosEnd,
RemapBlendAction **  ppNewAction
[static]
 

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.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/94
Parameters:
pOp = ptr to the operation to which this action belongs [INPUTS] pActionList = ptr to action list to which this action should be added pNodeBlend = ptr to NodeBlend to change RemapRef = remap ref value to pass to pNodeBlend->Remap() IndexStart = mapping to apply to the start node IndexEnd = mapping to apply to the end node
ppNewAction = ptr to a ptr to an action, allowing the function to return [OUTPUTS] a pointer to the created action
Returns:
ActionCode, one of AC_OK, AC_NO_RECORD or AC_FAIL
This function actually performs the remapping of pNodeBlend, using pNodeBlend->Remap(). This is so that it will only function if it successfully creates the action.
Returns:
Errors: -
See also:
Action::Init()

Definition at line 6990 of file blndtool.cpp.

06997 {
06998     UINT32 ActSize = sizeof(RemapBlendAction);
06999 
07000     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(RemapBlendAction),(Action**)ppNewAction);
07001 
07002     if (Ac != AC_FAIL)
07003     {
07004         DocCoord InvPosStart,InvPosEnd;
07005 
07006         if (pNodeBlend->Remap(RemapRef,PosStart,PosEnd,&InvPosStart,&InvPosEnd))
07007         {
07008             (*ppNewAction)->pNodeBlend      = pNodeBlend;
07009             (*ppNewAction)->RemapRef        = RemapRef;
07010             (*ppNewAction)->InvPosStart     = InvPosStart;
07011             (*ppNewAction)->InvPosEnd       = InvPosEnd;
07012         }
07013         else
07014         {
07015             ERROR3("pNodeBlend->Remap() failed");
07016             Ac = AC_FAIL;
07017         }
07018     }
07019 
07020     return Ac;
07021 }


Member Data Documentation

DocCoord RemapBlendAction::InvPosEnd [protected]
 

Definition at line 746 of file blndtool.h.

DocCoord RemapBlendAction::InvPosStart [protected]
 

Definition at line 745 of file blndtool.h.

NodeBlend* RemapBlendAction::pNodeBlend [protected]
 

Definition at line 743 of file blndtool.h.

UINT32 RemapBlendAction::RemapRef [protected]
 

Definition at line 744 of file blndtool.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:26 2007 for Camelot by  doxygen 1.4.4