ChangeContourToOuterAction Class Reference

Changes the node to an outer contour node & regenerates. More...

#include <opcntr.h>

Inheritance diagram for ChangeContourToOuterAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeContourToOuterAction ()
 Constructor for the action.
 ~ChangeContourToOuterAction ()
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 *pContour, ChangeContourToOuterAction **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_pContour
MILLIPOINT m_LastWidth

Detailed Description

Changes the node to an outer contour node & regenerates.

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

Definition at line 358 of file opcntr.h.


Constructor & Destructor Documentation

ChangeContourToOuterAction::ChangeContourToOuterAction  ) 
 

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

01742 {
01743     m_LastWidth = 0;
01744 
01745 }

ChangeContourToOuterAction::~ChangeContourToOuterAction  ) 
 

Definition at line 1838 of file opcntr.cpp.

01839 {
01840     
01841 }


Member Function Documentation

ActionCode ChangeContourToOuterAction::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 1811 of file opcntr.cpp.

01812 {
01813     ChangeContourToOuterAction * pNewAction = NULL;
01814 
01815     // first, initialise an action to restore all the current widths in my list
01816     ActionCode Ac = ChangeContourToOuterAction::Init(pOperation,
01817                                                    pOppositeActLst,
01818                                                    m_pContour,
01819                                                    &pNewAction);
01820 
01821     Document * pDoc = Document::GetCurrent();
01822 
01823     if (Ac == AC_OK)
01824     {
01825         if (pDoc)
01826             pDoc->ForceRedraw(m_pContour->FindParentSpread(), m_pContour->GetBoundingRect(), FALSE, m_pContour);
01827 
01828         m_pContour->SetWidth(m_LastWidth);
01829         m_pContour->RegenerateNode(NULL, FALSE);
01830 
01831         if (pDoc)
01832             pDoc->ForceRedraw(m_pContour->FindParentSpread(), m_pContour->GetBoundingRect(), FALSE, m_pContour);
01833     }
01834 
01835     return Ac;
01836 }

ActionCode ChangeContourToOuterAction::Init Operation pOp,
ActionList pActionList,
NodeContourController pController,
ChangeContourToOuterAction **  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 pNodes = ptr to node list containing the NodeBevel nodes to be regenerated
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 1778 of file opcntr.cpp.

01782 {
01783     UINT32 ActSize = sizeof(ChangeContourToOuterAction);
01784     
01785     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeContourToOuterAction),(Action**)ppNewAction);
01786 
01787     if (Ac == AC_OK)
01788     {
01789         (*ppNewAction)->m_pContour = pController;
01790         (*ppNewAction)->m_LastWidth = pController->GetWidth();
01791     }
01792 
01793     return Ac;
01794 }


Member Data Documentation

MILLIPOINT ChangeContourToOuterAction::m_LastWidth [protected]
 

Definition at line 373 of file opcntr.h.

NodeContourController* ChangeContourToOuterAction::m_pContour [protected]
 

Definition at line 372 of file opcntr.h.


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