#include <opcntr.h>
Inheritance diagram for ChangeContourToInnerAction:
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 | |
NodeContourController * | m_pContour |
MILLIPOINT | m_LastWidth |
Definition at line 383 of file opcntr.h.
|
Constructor for the action.
Definition at line 1860 of file opcntr.cpp. 01861 { 01862 m_LastWidth = 0; 01863 01864 }
|
|
Definition at line 1957 of file opcntr.cpp.
|
|
Executes the action. Causes a regen of all bevels nodes in the action's list.
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 }
|
|
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.
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 }
|
|
|
|
|