#include <opliveeffects.h>
Inheritance diagram for ChangeEffectResAction:
Public Member Functions | |
ChangeEffectResAction () | |
~ChangeEffectResAction () | |
virtual ActionCode | Execute () |
Inserts the floating endpoint into the Line Tool, creating an undo action to remove the endpoint. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, Action **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 BOOL | CreateChangeEffectResAction (Operation *pOp, NodeBitmapEffect *pEffectNode, double dResolution) |
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list. | |
Public Attributes | |
NodeBitmapEffect * | m_pEffectNode |
double | m_dResolution |
Definition at line 636 of file opliveeffects.h.
|
Definition at line 4282 of file opliveeffects.cpp. 04283 { 04284 m_dResolution = 0; 04285 m_pEffectNode = NULL; 04286 }
|
|
Definition at line 4423 of file opliveeffects.cpp. 04424 { 04425 m_pEffectNode = NULL; 04426 }
|
|
This static function makes it a little easier to use this action. It creates an instance of this action and appends it to the action list.
Definition at line 4346 of file opliveeffects.cpp. 04350 { 04351 ERROR3IF(pOp==NULL, "CreateChangeEffectResAction given NULL op pointer"); 04352 ERROR3IF(pEffectNode==NULL, "CreateChangeEffectResAction given NULL node pointer"); 04353 04354 if (dRes == pEffectNode->GetPixelsPerInchValue()) // Prevent unwanted extra work 04355 return FALSE; 04356 04357 ChangeEffectResAction* RecAction = NULL; 04358 ActionCode Act = ChangeEffectResAction::Init(pOp, pOp->GetUndoActionList(), (Action**)&RecAction); 04359 if ( (Act == AC_OK) && (RecAction != NULL) ) 04360 { 04361 RecAction->m_dResolution = pEffectNode->GetPixelsPerInchValue(); 04362 RecAction->m_pEffectNode = pEffectNode; 04363 } 04364 else if (Act==AC_FAIL) 04365 { 04366 pOp->FailAndExecute(); 04367 pOp->End(); 04368 } 04369 04370 return (Act != AC_FAIL); 04371 }
|
|
Inserts the floating endpoint into the Line Tool, creating an undo action to remove the endpoint.
Reimplemented from Action. Definition at line 4390 of file opliveeffects.cpp. 04391 { 04392 ChangeEffectResAction* ReAction = NULL; 04393 ActionCode Act = AC_FAIL; 04394 04395 // Create a redo action for this action, which is another ChangeEffectResAction 04396 Act = ChangeEffectResAction::Init(pOperation, 04397 pOppositeActLst, 04398 (Action**)(&ReAction)); 04399 if (Act == AC_FAIL) 04400 return AC_FAIL; 04401 04402 // --------------------------------------------------- 04403 // Record the current values in the Action 04404 ReAction->m_pEffectNode = m_pEffectNode; 04405 ReAction->m_dResolution = m_pEffectNode->GetPixelsPerInchValue();; 04406 04407 // --------------------------------------------------- 04408 // Now do the actual action 04409 if (m_pEffectNode->IsLockedEffect()) 04410 { 04411 ((NodeLockedEffect*)m_pEffectNode)->SetPixelsPerInch(m_dResolution); 04412 } 04413 else 04414 if (m_pEffectNode->IsBitmapEffect()) 04415 { 04416 ((NodeBitmapEffect*)m_pEffectNode)->SetPixelsPerInch(m_dResolution); 04417 m_pEffectNode->ReleaseCached(); 04418 } 04419 04420 return Act; 04421 }
|
|
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 4314 of file opliveeffects.cpp. 04317 { 04318 UINT32 ActSize = sizeof(ChangeEffectResAction); 04319 04320 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(ChangeEffectResAction), NewAction); 04321 04322 return Ac; 04323 }
|
|
Definition at line 654 of file opliveeffects.h. |
|
Definition at line 653 of file opliveeffects.h. |