ChangeContourColourTypeAction 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 <opcntr.h>

Inheritance diagram for ChangeContourColourTypeAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeContourColourTypeAction ()
 Constructor for the action.
 ~ChangeContourColourTypeAction ()
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, NodeContourController *pThisNodeContour, ColourBlendType type, ChangeContourColourTypeAction **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

NodeContourControllerm_pNode
ColourBlendType m_OldType

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 634 of file opcntr.h.


Constructor & Destructor Documentation

ChangeContourColourTypeAction::ChangeContourColourTypeAction  ) 
 

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 2930 of file opcntr.cpp.

02931 {
02932     m_pNode = NULL;
02933 }

ChangeContourColourTypeAction::~ChangeContourColourTypeAction  ) 
 

Definition at line 3030 of file opcntr.cpp.

03031 {
03032 }


Member Function Documentation

ActionCode ChangeContourColourTypeAction::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 3013 of file opcntr.cpp.

03014 {
03015     ChangeContourColourTypeAction * pAction = NULL;
03016     
03017     ActionCode Act = ChangeContourColourTypeAction::Init(   pOperation, 
03018                                         pOppositeActLst,
03019                                         m_pNode,
03020                                         m_OldType,
03021                                         &pAction);
03022     if (Act != AC_FAIL)
03023     {
03024         
03025     }
03026 
03027     return Act;
03028 }

ActionCode ChangeContourColourTypeAction::Init Operation pOp,
ActionList pActionList,
NodeContourController pThisNodeContour,
ColourBlendType  type,
ChangeContourColourTypeAction **  NewAction
[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 2967 of file opcntr.cpp.

02972 {
02973     UINT32 ActSize = sizeof(ChangeContourColourTypeAction);
02974 
02975     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,
02976         CC_RUNTIME_CLASS(ChangeContourColourTypeAction),(Action**)NewAction);
02977 
02978     Document * pDoc = Document::GetCurrent();
02979 
02980     if (Ac != AC_FAIL)
02981     {
02982         (*NewAction)->m_pNode  = pThisNodeContour;
02983         (*NewAction)->m_OldType = pThisNodeContour->GetColourBlendType();
02984         pThisNodeContour->SetColourBlendType(type);     
02985 
02986         // redraw the contour
02987         if (pDoc)
02988         {
02989             pDoc->ForceRedraw(pThisNodeContour->FindParentSpread(), 
02990                 pThisNodeContour->GetBoundingRect(), FALSE, pThisNodeContour);
02991         }
02992     }
02993 
02994     return Ac;
02995 }


Member Data Documentation

ColourBlendType ChangeContourColourTypeAction::m_OldType [protected]
 

Definition at line 650 of file opcntr.h.

NodeContourController* ChangeContourColourTypeAction::m_pNode [protected]
 

Definition at line 649 of file opcntr.h.


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