OpEffectRes Class Reference

Operation to change effect resolution. See also:. More...

#include <opliveeffects.h>

Inheritance diagram for OpEffectRes:

OpLiveEffect SelOperation UndoableOperation Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual void GetOpName (String_256 *pstrOpName)
virtual BOOL DoEffectOp (ListRange *pLevelRange, OpLiveEffectParam *pLEOpParam)
virtual BOOL DoEffectNodeOp (NodeEffect *pEffect, OpLiveEffectParam *pParam, NodeBitmapEffect **ppNewEffect)
virtual BOOL MayChangeNodeBounds () const

Static Public Member Functions

static OpState GetState (String_256 *pstrDescription, OpDescriptor *pOpDesc)

Private Member Functions

 CC_DECLARE_DYNCREATE (OpEffectRes)

Detailed Description

Operation to change effect resolution. See also:.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005

Definition at line 504 of file opliveeffects.h.


Member Function Documentation

OpEffectRes::CC_DECLARE_DYNCREATE OpEffectRes   )  [private]
 

BOOL OpEffectRes::DoEffectNodeOp NodeEffect pLE,
OpLiveEffectParam pParam,
NodeBitmapEffect **  ppNewEffect
[virtual]
 

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: See also:

Reimplemented from OpLiveEffect.

Definition at line 3615 of file opliveeffects.cpp.

03616 {
03617     // We should have a decent list of LiveEffect nodes...
03618     ERROR2IF(pLE==NULL, FALSE, "OpEffectRes::DoEffectNodeOp given NULL node");
03619     ERROR2IF(pParam==NULL, FALSE, "OpEffectRes::DoEffectNodeOp given NULL param");
03620 
03621     if (pLE->IsLockedEffect())
03622     {
03623         // Only change the res of scriptable effects
03624         if (((NodeLockedEffect*)pLE)->CanBeUnlocked())
03625         {
03626             if (ChangeEffectResAction::CreateChangeEffectResAction(this, (NodeLockedEffect*)pLE, pParam->dResolution))
03627             {
03628                 ((NodeLockedEffect*)pLE)->SetPixelsPerInch(pParam->dResolution);
03629 
03630                 // Ensure that locked effects will render their children
03631                 // because they don't respond to ReleaseCached...
03632                 ((NodeLockedEffect*)pLE)->SetProcessedBitmap(NULL, NULL, DocRect(), 0, 0, 0, 0);
03633                 pLE->ReleaseCached(TRUE, FALSE);
03634 
03635                 *ppNewEffect = (NodeLockedEffect*)pLE;
03636 
03637                 return TRUE;
03638             }
03639         }
03640     }
03641     else
03642         if (pLE->IsBitmapEffect())
03643         {
03644             if (ChangeEffectResAction::CreateChangeEffectResAction(this, (NodeBitmapEffect*)pLE, pParam->dResolution))
03645             {
03646                 ((NodeBitmapEffect*)pLE)->SetPixelsPerInch(pParam->dResolution);
03647                 pLE->ReleaseCached();
03648                 *ppNewEffect = (NodeBitmapEffect*)pLE;
03649 
03650                 return TRUE;
03651             }
03652         }
03653         else
03654             ERROR3("Unknown effect type in OpEffectRes::DoEffectNodeOp");
03655 
03656     return FALSE;
03657 }

BOOL OpEffectRes::DoEffectOp ListRange pLevelRange,
OpLiveEffectParam pLEOpParam
[virtual]
 

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: See also:

Reimplemented from OpLiveEffect.

Definition at line 3589 of file opliveeffects.cpp.

03590 {
03591     BOOL bOK = FALSE;
03592 
03593     bOK = DoEffectRangeOp(_R(IDS_LE_CHANGE_RES_PROGRESS), pLevelRange, pLEOpParam);
03594 
03595     return bOK;
03596 }

void OpEffectRes::GetOpName String_256 pstrOpName  )  [virtual]
 

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: See also:

Reimplemented from Operation.

Definition at line 3567 of file opliveeffects.cpp.

03568 {
03569     *pstrOpName = String_256(_R(IDS_LE_OPEFFECTRES));
03570 }

OpState OpEffectRes::GetState String_256 pstrDescription,
OpDescriptor pOpDesc
[static]
 

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: See also:

Definition at line 3535 of file opliveeffects.cpp.

03536 {
03537     // default is an unticked, *GREYED*, on-menu state.
03538     OpState OpSt;
03539     OpSt.Greyed = FALSE;
03540     *pstrDescription = String_256(_R(IDS_DESCRIBE_LIVEEFFECT));
03541 
03542     if (XPEHost::IsEditSessionRunning())
03543     {
03544         OpSt.Greyed = TRUE;
03545         *pstrDescription = String_256(_R(IDS_LE_EDIT_RUNNING));
03546     }
03547 
03548     return OpSt;
03549 }

virtual BOOL OpEffectRes::MayChangeNodeBounds  )  const [inline, virtual]
 

Reimplemented from SelOperation.

Definition at line 517 of file opliveeffects.h.

00517 { return FALSE; }


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