ChangeBlendStepsAction Class Reference

An action which undoes the modification of a path's filled bit (or redoes it) It can also be used to undo the IsStroked flag as well. More...

#include <blndtool.h>

Inheritance diagram for ChangeBlendStepsAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeBlendStepsAction ()
 Constructor for the action.
 ~ChangeBlendStepsAction ()
virtual ActionCode Execute ()
 Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend.

Static Public Member Functions

static ActionCode Init (Operation *pOp, ActionList *pActionList, Node *pThisNodeBlend, UINT32 NumSteps, double DistanceEntered, ChangeBlendStepsAction **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

NodepNodeBlend
UINT32 OldNumSteps
double OldDistanceEntered

Detailed Description

An action which undoes the modification of a path's filled bit (or redoes it) It can also be used to undo the IsStroked flag as well.

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

Definition at line 693 of file blndtool.h.


Constructor & Destructor Documentation

ChangeBlendStepsAction::ChangeBlendStepsAction  ) 
 

Constructor for the action.

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

Errors: -

See also:
-

Definition at line 6069 of file blndtool.cpp.

06070 {
06071     pNodeBlend  = NULL;
06072     OldNumSteps = 0;
06073 }

ChangeBlendStepsAction::~ChangeBlendStepsAction  ) 
 

Definition at line 6176 of file blndtool.cpp.

06177 {
06178 }


Member Function Documentation

ActionCode ChangeBlendStepsAction::Execute  )  [virtual]
 

Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/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 6144 of file blndtool.cpp.

06145 {
06146     ActionCode Act;
06147     ChangeBlendStepsAction* pAction;
06148 
06149     UINT32 NumSteps = 0;
06150     double DistanceEntered = 0.0;
06151 
06152     if (pNodeBlend->IsKindOf(CC_RUNTIME_CLASS(NodeBlend)))
06153     {
06154         NumSteps = ((NodeBlend *)pNodeBlend)->GetNumBlendSteps();
06155         DistanceEntered = ((NodeBlend *)pNodeBlend)->GetDistanceEntered();
06156     }
06157     Act = ChangeBlendStepsAction::Init( pOperation, 
06158                                         pOppositeActLst,
06159                                         pNodeBlend,
06160                                         NumSteps,
06161                                         DistanceEntered,
06162                                         &pAction);
06163     if (Act != AC_FAIL)
06164     {
06165         if (pNodeBlend->IsKindOf(CC_RUNTIME_CLASS(NodeBlend)))
06166         {
06167             ((NodeBlend *)pNodeBlend)->SetNumBlendSteps(OldNumSteps);
06168             ((NodeBlend *)pNodeBlend)->SetDistanceEntered(OldDistanceEntered);
06169         }
06170         
06171     }
06172 
06173     return Act;
06174 }

ActionCode ChangeBlendStepsAction::Init Operation pOp,
ActionList pActionList,
Node pThisNodeBlend,
UINT32  NumSteps,
double  DistanceEntered,
ChangeBlendStepsAction **  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:
7/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 pThisNodeBlend = ptr to NodeBlend to change NumSteps = Num steps to applied to pThisNodeBlend
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

Errors: -

See also:
Action::Init()

Definition at line 6107 of file blndtool.cpp.

06113 {
06114     UINT32 ActSize = sizeof(ChangeBlendStepsAction);
06115 
06116     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeBlendStepsAction),(Action**)ppNewAction);
06117 
06118     if (Ac != AC_FAIL)
06119     {
06120         (*ppNewAction)->pNodeBlend  = pThisNodeBlend;
06121         (*ppNewAction)->OldNumSteps = NumSteps;
06122         (*ppNewAction)->OldDistanceEntered = DistanceEntered;
06123     }
06124 
06125     return Ac;
06126 }


Member Data Documentation

double ChangeBlendStepsAction::OldDistanceEntered [protected]
 

Definition at line 711 of file blndtool.h.

UINT32 ChangeBlendStepsAction::OldNumSteps [protected]
 

Definition at line 710 of file blndtool.h.

Node* ChangeBlendStepsAction::pNodeBlend [protected]
 

Definition at line 709 of file blndtool.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:24 2007 for Camelot by  doxygen 1.4.4