OpEffectLockAll Class Reference

Operation to change effect locked state. See also:. More...

#include <opliveeffects.h>

Inheritance diagram for OpEffectLockAll:

OpEffectLock 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 MayChangeNodeBounds () const

Static Public Member Functions

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

Protected Member Functions

virtual BOOL CheckEffectOpParam (OpLiveEffectParam *pLEOpParam)

Private Member Functions

 CC_DECLARE_DYNCREATE (OpEffectLockAll)

Detailed Description

Operation to change effect locked state. See also:.

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

Definition at line 570 of file opliveeffects.h.


Member Function Documentation

OpEffectLockAll::CC_DECLARE_DYNCREATE OpEffectLockAll   )  [private]
 

BOOL OpEffectLockAll::CheckEffectOpParam OpLiveEffectParam pLEOpParam  )  [protected, virtual]
 

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
08/06/2005
Parameters:
pLEopParam - pointer to parameter object to check [INPUTS]
- [OUTPUTS]
Returns:
TRUE if Op can continue FALSE otherwise

Reimplemented from OpLiveEffect.

Definition at line 4061 of file opliveeffects.cpp.

04062 {
04063     return TRUE;
04064 }

BOOL OpEffectLockAll::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 OpEffectLock.

Definition at line 4009 of file opliveeffects.cpp.

04010 {
04011     SelRange Sel(*(GetApplication()->FindSelection()));
04012 
04013     Sel.SetPromoteToParent(TRUE);
04014     Node* pNode = Sel.FindFirst();
04015     Node* pNextNode = NULL;
04016     NodeBitmapEffect* pNewEffect = NULL;
04017     BOOL bChangedSomething = FALSE;
04018     BOOL bChanged;
04019     while (pNode)
04020     {
04021         pNextNode = Sel.FindNext(pNode);
04022 
04023         // We must find all the uppermost effects in our subtree
04024         // Use a preorder traversal to do this, pruning off subtrees as soon as an effect is found
04025         Node* pScanNode = pNode->FindFirstPreorder();
04026         while (pScanNode)
04027         {
04028             if (pScanNode->IsBitmapEffect() && !((NodeBitmapEffect*)pScanNode)->IsFeatherEffect())
04029             {
04030                 pNewEffect = NULL;
04031                 bChanged = OpEffectLock::DoEffectNodeOp((NodeBitmapEffect*)pScanNode, pLEOpParam, &pNewEffect);
04032                 if (pNewEffect && bChanged)
04033                 {
04034                     if (pScanNode == pNode)     // Update root node so that FindNextPreorder isn't confused
04035                         pNode = pNewEffect;
04036                     pScanNode = pNewEffect;
04037                 }
04038                 bChangedSomething = bChangedSomething || bChanged;
04039 
04040                 // We don't want to lock any effects under this one
04041                 // So prune this subtree from the traversal -
04042                 // find the next node in preorder order outside the scan node
04043                 pScanNode = pScanNode->FindNextPreorder(pNode, TRUE);
04044             }
04045             else
04046                 pScanNode = pScanNode->FindNextPreorder(pNode);
04047         }
04048 
04049         pNode = pNextNode;
04050     }
04051 
04052     if (!bChangedSomething)
04053         SucceedAndDiscard();
04054 
04055     return TRUE;
04056 }

void OpEffectLockAll::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 OpEffectLock.

Definition at line 3987 of file opliveeffects.cpp.

03988 {
03989     *pstrOpName = String_256(_R(IDS_LE_OPEFFECTLOCKALL));
03990 }

OpState OpEffectLockAll::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:

Reimplemented from OpEffectLock.

Definition at line 3955 of file opliveeffects.cpp.

03956 {
03957     // default is an unticked, *GREYED*, on-menu state.
03958     OpState OpSt;
03959     OpSt.Greyed = FALSE;
03960     *pstrDescription = String_256(_R(IDS_DESCRIBE_LIVEEFFECT));
03961 
03962     if (XPEHost::IsEditSessionRunning())
03963     {
03964         OpSt.Greyed = TRUE;
03965         *pstrDescription = String_256(_R(IDS_LE_EDIT_RUNNING));
03966     }
03967 
03968     return OpSt;
03969 }

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

Reimplemented from OpEffectLock.

Definition at line 586 of file opliveeffects.h.

00586 { 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