ToggleInsetPathAction Class Reference

Toggles the inset path flag on the given node. More...

#include <opcntr.h>

Inheritance diagram for ToggleInsetPathAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ToggleInsetPathAction ()
 Constructor for the action.
 ~ToggleInsetPathAction ()
virtual ActionCode Execute ()
 Executes the action. Causes a regen of all bevels nodes in the action's list.

Static Public Member Functions

static ActionCode Init (Operation *pOp, ActionList *pActionList, NodeContourController *pNode, BOOL bInsetPathFlag, ToggleInsetPathAction **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
BOOL m_OldSetting

Detailed Description

Toggles the inset path flag on the given node.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/3/99

Definition at line 891 of file opcntr.h.


Constructor & Destructor Documentation

ToggleInsetPathAction::ToggleInsetPathAction  ) 
 

Constructor for the action.

Author:
Olivier_Gascoin (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/01/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 5180 of file opcntr.cpp.

05181 {
05182     m_pNode = NULL;
05183 }

ToggleInsetPathAction::~ToggleInsetPathAction  ) 
 

Definition at line 5279 of file opcntr.cpp.

05280 {
05281 
05282 }


Member Function Documentation

ActionCode ToggleInsetPathAction::Execute  )  [virtual]
 

Executes the action. Causes a regen of all bevels nodes in the action's list.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/3/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 5253 of file opcntr.cpp.

05254 {
05255     ActionCode Act;
05256     ToggleInsetPathAction* pAction;
05257 
05258     // re-invalidate the old rect
05259     Document * pDoc = Document::GetCurrent();
05260 
05261     if (pDoc)
05262     {
05263         pDoc->ForceRedraw(m_pNode->FindParentSpread(), m_pNode->GetBoundingRect(), FALSE, m_pNode);
05264     }
05265     
05266     Act = ToggleInsetPathAction::Init(  pOperation, 
05267                                         pOppositeActLst,
05268                                         m_pNode,
05269                                         m_OldSetting,
05270                                         &pAction);
05271 
05272     if (Act != AC_FAIL)
05273     {
05274     }
05275 
05276     return Act;
05277 }

ActionCode ToggleInsetPathAction::Init Operation pOp,
ActionList pActionList,
NodeContourController pNode,
BOOL  bFlag,
ToggleInsetPathAction **  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:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/3/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 pNode = ptr to the node to address
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 5215 of file opcntr.cpp.

05220 {
05221     UINT32 ActSize = sizeof(ToggleInsetPathAction);
05222     
05223     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ToggleInsetPathAction),(Action**)ppNewAction);
05224 
05225     if (Ac == AC_OK)
05226     {
05227         (*ppNewAction)->m_pNode = pNode;
05228         (*ppNewAction)->m_OldSetting = pNode->GetInsetPathFlag();
05229 
05230         pNode->SetInsetPathFlag(bFlag);
05231 
05232         pNode->RegenerateNode(NULL, FALSE, TRUE);
05233     }
05234 
05235     return Ac;
05236 }


Member Data Documentation

BOOL ToggleInsetPathAction::m_OldSetting [protected]
 

Definition at line 907 of file opcntr.h.

NodeContourController* ToggleInsetPathAction::m_pNode [protected]
 

Definition at line 906 of file opcntr.h.


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