SetTimeStampUpdateTypeAction Class Reference

The purpose of this action is to set a flag that determines what happens when the brushed nodepath calls its timestamping brush attribute to update itself. Setting this flag to TRUE indicates that our path has changed so that our timestamping list coordinates are no longer on the line. Therefore we will reposition these points on the new line. Setting it to FALSE indicates that we have added or removed points from the timestamping list and should sort and reorder it to make sure it is ok. More...

#include <opdrbrsh.h>

Inheritance diagram for SetTimeStampUpdateTypeAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

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

Static Public Member Functions

static ActionCode Init (Operation *pOp, ActionList *pActionList, AttrBrushType *pAttrBrush, NodePath *pNodePath, ListUpdateType TypeToSet, SetTimeStampUpdateTypeAction **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.

Public Attributes

NodePathm_pNodePath
AttrBrushTypem_pAttrBrush
ListUpdateType m_TypeToSet

Detailed Description

The purpose of this action is to set a flag that determines what happens when the brushed nodepath calls its timestamping brush attribute to update itself. Setting this flag to TRUE indicates that our path has changed so that our timestamping list coordinates are no longer on the line. Therefore we will reposition these points on the new line. Setting it to FALSE indicates that we have added or removed points from the timestamping list and should sort and reorder it to make sure it is ok.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/3/2000
See also:
-

Definition at line 708 of file opdrbrsh.h.


Constructor & Destructor Documentation

SetTimeStampUpdateTypeAction::SetTimeStampUpdateTypeAction  ) 
 

Constructor for the action.

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

Errors: -

See also:
-

Definition at line 5635 of file opdrbrsh.cpp.

05636 {
05637     m_pNodePath = NULL;
05638     m_pAttrBrush = NULL;
05639     m_TypeToSet = UPDATE_NONE;
05640 }

SetTimeStampUpdateTypeAction::~SetTimeStampUpdateTypeAction  ) 
 

destructor for the action

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

Errors: -

See also:
-

Definition at line 5659 of file opdrbrsh.cpp.

05660 {
05661 
05662 }


Member Function Documentation

ActionCode SetTimeStampUpdateTypeAction::Execute  )  [virtual]
 

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

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/11/99
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 5747 of file opdrbrsh.cpp.

05748 {
05749     ActionCode Act;
05750     SetTimeStampUpdateTypeAction* pAction;
05751     Act = SetTimeStampUpdateTypeAction::Init(pOperation,pOppositeActLst,m_pAttrBrush, m_pNodePath, m_TypeToSet, &pAction);
05752 
05753     return Act;
05754 }

ActionCode SetTimeStampUpdateTypeAction::Init Operation pOp,
ActionList pActionList,
AttrBrushType pAttrBrush,
NodePath pNodePath,
ListUpdateType  TypeToSet,
SetTimeStampUpdateTypeAction **  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:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/11/99
Parameters:
pOp = ptr to the operation to which this action belongs [INPUTS] pActionList = ptr to action list to which this action should be added pAttrBrush - the brush attribute to perform the action on pNewPoints - the points to add to the list StartDistance - the distance to start adding the points
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 changes the blend node in a way specified in pChangeParam
Returns:
Errors: -
See also:
Action::Init()

Definition at line 5697 of file opdrbrsh.cpp.

05699 {
05700     ERROR2IF(pAttrBrush == NULL,AC_FAIL,"pAttrBrush is NULL");
05701     ERROR2IF(pNodePath == NULL, AC_FAIL, "Nodepath is NULL");
05702 
05703     // just check that our brush isn't a default
05704     if (pAttrBrush->GetBrushHandle() == BrushHandle_NoBrush)
05705         return AC_OK;
05706     // Get the attribute value, just to make sure
05707     BrushAttrValue* pVal = (BrushAttrValue*)pAttrBrush->GetAttributeValue();
05708     if (pVal == NULL)
05709         return AC_FAIL;
05710 
05711     // make the new action
05712     UINT32 ActSize = sizeof(SetTimeStampUpdateTypeAction);
05713     SetTimeStampUpdateTypeAction* pNewAction;
05714     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(SetTimeStampUpdateTypeAction),(Action**)&pNewAction);
05715     *ppNewAction = pNewAction;
05716 
05717     // all we really do is ask the brush to update itself
05718     if (Ac != AC_FAIL)
05719         pVal->SetTimeStampUpdateType(TypeToSet);
05720 
05721     // set the members of the undo action
05722     pNewAction->m_pAttrBrush = pAttrBrush;
05723     pNewAction->m_pNodePath = pNodePath;
05724     pNewAction->m_TypeToSet= TypeToSet;
05725 
05726     return Ac;
05727 }


Member Data Documentation

AttrBrushType* SetTimeStampUpdateTypeAction::m_pAttrBrush
 

Definition at line 726 of file opdrbrsh.h.

NodePath* SetTimeStampUpdateTypeAction::m_pNodePath
 

Definition at line 725 of file opdrbrsh.h.

ListUpdateType SetTimeStampUpdateTypeAction::m_TypeToSet
 

Definition at line 727 of file opdrbrsh.h.


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