#include <opcntr.h>
Inheritance diagram for ChangeContourObjectProfileAction:
Public Member Functions | |
ChangeContourObjectProfileAction () | |
Constructor for the action. | |
~ChangeContourObjectProfileAction () | |
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, CProfileBiasGain Profile, ChangeContourObjectProfileAction **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. | |
static void | ChangeObjectProfileWithNoUndo (CProfileBiasGain &Profile) |
When applying contour (object) profiles, we only want to generate one bit of undo information. This function allows us to meet this requirement (the one bit of undo information is generated via OpChangeContourObjectProfile::DoWithParam ()). This function is ONLY called from within ContourInfoBarOp::ChangeProfile () - after OpChangeContourObjectProfile::DoWithParam () has been called. | |
Protected Attributes | |
NodeContourController * | m_pNode |
CProfileBiasGain | m_Profile |
Definition at line 716 of file opcntr.h.
|
Constructor for the action.
Definition at line 3395 of file opcntr.cpp.
|
|
Definition at line 3567 of file opcntr.cpp.
|
|
When applying contour (object) profiles, we only want to generate one bit of undo information. This function allows us to meet this requirement (the one bit of undo information is generated via OpChangeContourObjectProfile::DoWithParam ()). This function is ONLY called from within ContourInfoBarOp::ChangeProfile () - after OpChangeContourObjectProfile::DoWithParam () has been called.
Definition at line 3484 of file opcntr.cpp. 03485 { 03486 BeginSlowJob(-1, TRUE); 03487 03488 List NodeList; 03489 BevelTools::BuildListOfSelectedNodes(&NodeList, CC_RUNTIME_CLASS(NodeContourController)); 03490 03491 NodeListItem * pItem = (NodeListItem *)NodeList.GetHead(); 03492 03493 NodeContourController * pController = NULL; 03494 03495 // Node * pParent = NULL; 03496 03497 // ChangeContourObjectProfileAction * pAction= NULL; 03498 03499 Document * pDoc = Document::GetCurrent(); 03500 03501 while (pItem) 03502 { 03503 pController = (NodeContourController *)pItem->pNode; 03504 03505 // change the profile & regen 03506 pController->SetObjectProfile(Profile); 03507 pController->RegenerateNode(NULL, FALSE); 03508 03509 // redraw the contour 03510 if (pDoc) 03511 { 03512 pDoc->ForceRedraw(pController->FindParentSpread(), 03513 pController->GetBoundingRect(), FALSE, pController); 03514 } 03515 03516 pItem = (NodeListItem *)NodeList.GetNext(pItem); 03517 } 03518 03519 NodeList.DeleteAll(); 03520 03521 EndSlowJob (); 03522 03523 if (pDoc->GetOpHistory ().CanRedo ()) 03524 { 03525 // then we need to clear out the redo information - since we are now 'before' it .... 03526 pDoc->GetOpHistory ().DeleteRedoableOps (); 03527 03528 // and update the state of things .... 03529 DialogBarOp::SetSystemStateChanged(); 03530 DialogBarOp::UpdateStateOfAllBars(); 03531 } 03532 }
|
|
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.
Reimplemented from Action. Definition at line 3550 of file opcntr.cpp. 03551 { 03552 ChangeContourObjectProfileAction * pAction = NULL; 03553 03554 ActionCode Act = ChangeContourObjectProfileAction::Init( pOperation, 03555 pOppositeActLst, 03556 m_pNode, 03557 m_Profile, 03558 &pAction); 03559 if (Act != AC_FAIL) 03560 { 03561 03562 } 03563 03564 return Act; 03565 }
|
|
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 3432 of file opcntr.cpp. 03437 { 03438 UINT32 ActSize = sizeof(ChangeContourObjectProfileAction); 03439 03440 ActionCode Ac = Action::Init(pOp,pActionList,ActSize, 03441 CC_RUNTIME_CLASS(ChangeContourObjectProfileAction),(Action**)NewAction); 03442 03443 Document * pDoc = Document::GetCurrent(); 03444 03445 if (Ac != AC_FAIL) 03446 { 03447 (*NewAction)->m_pNode = pThisNodeContour; 03448 (*NewAction)->m_Profile = pThisNodeContour->GetObjectProfile(); 03449 03450 // change the profile & regen 03451 pThisNodeContour->SetObjectProfile(Profile); 03452 pThisNodeContour->RegenerateNode(NULL, FALSE); 03453 03454 // redraw the contour 03455 if (pDoc) 03456 { 03457 pDoc->ForceRedraw(pThisNodeContour->FindParentSpread(), 03458 pThisNodeContour->GetBoundingRect(), FALSE, pThisNodeContour); 03459 } 03460 } 03461 03462 return Ac; 03463 }
|
|
|
|
|