ChangeContourToInnerAction Class Reference

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

#include <opcntr.h>

Inheritance diagram for ChangeContourToInnerAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeContourToInnerAction ()
 Constructor for the action.
 ~ChangeContourToInnerAction ()
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, ChangeContourToInnerAction **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 inner contour node & regenerates.

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

Definition at line 383 of file opcntr.h.


Constructor & Destructor Documentation

ChangeContourToInnerAction::ChangeContourToInnerAction  ) 
 

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

01861 {
01862     m_LastWidth = 0;
01863 
01864 }

ChangeContourToInnerAction::~ChangeContourToInnerAction  ) 
 

Definition at line 1957 of file opcntr.cpp.

01958 {
01959     
01960 }


Member Function Documentation

ActionCode ChangeContourToInnerAction::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 1930 of file opcntr.cpp.

01931 {
01932     ChangeContourToInnerAction * pNewAction = NULL;
01933 
01934     // first, initialise an action to restore all the current widths in my list
01935     ActionCode Ac = ChangeContourToInnerAction::Init(pOperation,
01936                                                    pOppositeActLst,
01937                                                    m_pContour,
01938                                                    &pNewAction);
01939 
01940     Document * pDoc = Document::GetCurrent();
01941 
01942     if (Ac == AC_OK)
01943     {
01944         if (pDoc)
01945             pDoc->ForceRedraw(m_pContour->FindParentSpread(), m_pContour->GetBoundingRect(), FALSE, m_pContour);
01946 
01947         m_pContour->SetWidth(m_LastWidth);
01948         m_pContour->RegenerateNode(NULL, FALSE);
01949 
01950         if (pDoc)
01951             pDoc->ForceRedraw(m_pContour->FindParentSpread(), m_pContour->GetBoundingRect(), FALSE, m_pContour);
01952     }
01953 
01954     return Ac;
01955 }

ActionCode ChangeContourToInnerAction::Init Operation pOp,
ActionList pActionList,
NodeContourController pController,
ChangeContourToInnerAction **  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 1897 of file opcntr.cpp.

01901 {
01902     UINT32 ActSize = sizeof(ChangeContourToInnerAction);
01903 
01904     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeContourToInnerAction),(Action**)ppNewAction);
01905 
01906     if (Ac == AC_OK)
01907     {
01908         (*ppNewAction)->m_pContour = pController;
01909         (*ppNewAction)->m_LastWidth = pController->GetWidth();
01910     }
01911 
01912     return Ac;
01913 }


Member Data Documentation

MILLIPOINT ChangeContourToInnerAction::m_LastWidth [protected]
 

Definition at line 398 of file opcntr.h.

NodeContourController* ChangeContourToInnerAction::m_pContour [protected]
 

Definition at line 397 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