OpEditLegacyEffect Class Reference

Hold all class for passing on requests to "edit" a legacy effect See also:. More...

#include <opliveeffects.h>

Inheritance diagram for OpEditLegacyEffect:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual void GetOpName (String_256 *pstrOpName)
virtual void Do (OpDescriptor *pOpDesc)
virtual void DoWithParam (OpDescriptor *pOpDesc, OpParam *pOpParam)

Static Public Member Functions

static OpState GetParamState (String_256 *pstrDescription, OpDescriptor *pOpDesc, OpParam *pOpParam)
 


Private Member Functions

 CC_DECLARE_DYNCREATE (OpEditLegacyEffect)

Detailed Description

Hold all class for passing on requests to "edit" a legacy effect See also:.

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

Definition at line 606 of file opliveeffects.h.


Member Function Documentation

OpEditLegacyEffect::CC_DECLARE_DYNCREATE OpEditLegacyEffect   )  [private]
 

void OpEditLegacyEffect::Do OpDescriptor pOpDesc  )  [virtual]
 

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

Errors: See also:

Reimplemented from Operation.

Definition at line 3248 of file opliveeffects.cpp.

03249 {
03250 //  ERROR3("Why are you doing this? You need params, boy, params!");
03251     DoWithParam(pOpDesc, NULL);
03252 }

void OpEditLegacyEffect::DoWithParam OpDescriptor pOpDesc,
OpParam pOpParam
[virtual]
 

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

Errors: See also:

Reimplemented from Operation.

Definition at line 3271 of file opliveeffects.cpp.

03272 {
03273     BOOL ok = FALSE;
03274 
03275     OpLiveEffectParam* pLEOpParam = NULL;
03276     if (pOpParam && pOpParam->IsKindOf(CC_RUNTIME_CLASS(OpLiveEffectParam)))
03277         pLEOpParam = (OpLiveEffectParam*) pOpParam;
03278 
03279     // Remember some details for later on when the Op ends successfully (?)
03280     if (pLEOpParam)
03281     {
03282         if (pLEOpParam->strOpUnique==String_256(POSTPRO_ID_SHADOW))
03283         {
03284             // Make sure the Shadow tool is current... (this func can be called from other tools)
03285             Tool* pShadowTool = Tool::FindTool(TOOLID_SOFTSHADOW);
03286             if (pShadowTool)
03287             {
03288                 INT32 iStackPos = pLEOpParam->StackPosition;
03289                 ListRange* pShadowRange = pLEOpParam->pPPStack->GetLevelRange(&iStackPos);
03290                 if (pShadowRange)
03291                 {
03292                     ((SoftShadowTool*)pShadowTool)->SelectShadowRange(pShadowRange);
03293                 }
03294 
03295                 pShadowTool->SetCurrent();
03296                 End();
03297                 return;
03298             }
03299         }
03300 
03301         if (pLEOpParam->strOpUnique==String_256(POSTPRO_ID_FEATHER))
03302         {
03303             INT32 iStackPos = pLEOpParam->StackPosition;
03304             ListRange* pFeatherRange = pLEOpParam->pPPStack->GetLevelRange(&iStackPos);
03305             OpChangeFeatherSize::SetEditContext(iStackPos, pFeatherRange);
03306             End();
03307             return;
03308         }
03309     }
03310 
03311     End();
03312 }

void OpEditLegacyEffect::GetOpName String_256 pstrOpName  )  [virtual]
 

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

Errors: See also:

Reimplemented from Operation.

Definition at line 3226 of file opliveeffects.cpp.

03227 {
03228     *pstrOpName = String_256(_R(IDS_LE_OPEDIT));
03229 }

OpState OpEditLegacyEffect::GetParamState String_256 pstrDescription,
OpDescriptor pOpDesc,
OpParam pOpParam
[static]
 

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

Errors: See also:

Definition at line 3190 of file opliveeffects.cpp.

03191 {
03192     // default is an unticked, *GREYED*, on-menu state.
03193     OpState OpSt;
03194     OpSt.Greyed = FALSE;
03195 
03196     if (XPEHost::IsEditSessionRunning())
03197     {
03198         OpSt.Greyed = TRUE;
03199         *pstrDescription = String_256(_R(IDS_LE_EDIT_RUNNING));
03200     }
03201     else if (GetApplication()->FindSelection()->FindFirst()==NULL)
03202     {
03203         OpSt.Greyed = TRUE;
03204         *pstrDescription = String_256(_R(IDS_LE_NOTHING_SELECTED));
03205     }
03206 
03207     return OpSt;
03208 }


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