opliveeffects.h

Go to the documentation of this file.
00001 // $Id: opliveeffects.h 1361 2006-06-25 16:43:38Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 //
00099 // Declaration of Bitmap Effects operations.
00100 //
00101 
00102 #ifndef INC_OPLIVEFX
00103 #define INC_OPLIVEFX
00104 
00105 #define OPTOKEN_APPLY_LIVEEFFECT        _T("ApplyLiveEffect")
00106 #define OPTOKEN_EDIT_LIVEEFFECT         _T("EditLiveEffect")
00107 #define OPTOKEN_DELETE_LIVEEFFECT       _T("DeleteLiveEffect")
00108 #define OPTOKEN_DELETEALL_LIVEEFFECT    _T("DeleteAllLiveEffect")
00109 #define OPTOKEN_APPLY_FEATHEREFFECT     _T("ApplyFeatherEffect")
00110 #define OPTOKEN_CHANGE_EFFECT_RES       _T("ChangeEffectRes")
00111 #define OPTOKEN_CHANGE_EFFECT_LOCK      _T("ChangeEffectLock")
00112 #define OPTOKEN_CHANGE_EFFECT_LOCKALL   _T("ChangeEffectLockAll")
00113 #define OPTOKEN_EDITEFFECTS             _T("EditEffectsRootMenuItem")
00114 #define OPTOKEN_EDIT_LEGACYEFFECT       _T("EditLegacyEffect")
00115 
00116 PORTNOTE("other","Define dummy IXMLDOMDocumentPtr")
00117 #ifndef EXCLUDE_FROM_XARALX
00118 #else
00119 typedef void           *IXMLDOMDocumentPtr;
00120 #endif
00121 
00122 //#include "selop.h"
00123 #include "menuitem.h"
00124 //#include "xpehost.h"
00125 //#include "biasgain.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00126 
00127 class Range;
00128 class ListRange;
00129 class NodeEffect;
00130 class EffectsStack;
00131 class NodeLiveEffect;
00132 class NodeFeatherEffect;
00133 class NodeBitmapEffect;
00134 
00135 // Define this if you want to pick up the development of the Feather Effect
00136 #define FEATHER_EFFECT
00137 
00138 /********************************************************************************************
00139 >   class OpLiveEffectParam
00140 
00141     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00142     Created:    09/09/2004
00143 
00144     Purpose:    Contain all the info transferred from the UI to the OpApplyLiveEffect
00145                 operation
00146 
00147     SeeAlso:    Operation::DoWithParam
00148 
00149 ********************************************************************************************/
00150 
00151 class OpLiveEffectParam : public OpMenuParam
00152 {
00153 CC_DECLARE_DYNAMIC(OpLiveEffectParam)
00154 
00155 public:
00156     OpLiveEffectParam() : OpMenuParam()
00157     {
00158         bIsDestructive = FALSE;
00159         StackPosition = -1;
00160         pPPStack = NULL;
00161         bReUseEditor = FALSE;
00162         pEditsList = NULL;
00163         bSilent = FALSE;
00164         dResolution = 0;
00165         bForceLock = FALSE;
00166     }
00167 
00168 // Properties
00169 public:
00170     BOOL                bIsDestructive;
00171     INT32                   StackPosition;
00172     EffectsStack*       pPPStack;
00173     BOOL                bReUseEditor;
00174     IXMLDOMDocumentPtr  pEditsList;
00175     BOOL                bSilent;
00176     double              dResolution;
00177     BOOL                bForceLock;
00178 };
00179 
00180 
00181 
00182 
00183 /********************************************************************************************
00184 >   class OpFeatherEffectParam
00185 
00186     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00187     Created:    24/11/2004
00188 
00189     Purpose:    Contain all the info transferred from the UI to the OpApplyLiveEffect
00190                 operation
00191 
00192     SeeAlso:    Operation::DoWithParam
00193 
00194 ********************************************************************************************/
00195 
00196 #ifdef FEATHER_EFFECT
00197 class OpFeatherEffectParam : public OpLiveEffectParam
00198 {
00199 CC_DECLARE_DYNAMIC(OpFeatherEffectParam)
00200 
00201 public:
00202     OpFeatherEffectParam() : OpLiveEffectParam()
00203     {
00204         FeatherSize = 0;
00205         //Profile = CProfileBiasGain default constructor
00206     }
00207 
00208 // Properties
00209 public:
00210     MILLIPOINT FeatherSize;
00211     CProfileBiasGain Profile;
00212 };
00213 #endif
00214 
00215 
00216 
00217 
00218 /********************************************************************************************
00219 
00220 >   class OpLiveEffect : public SelOperation
00221 
00222     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00223     Created:    13/09/2004
00224     Purpose:    Base class for all LiveEffect ops
00225     See also:   
00226 
00227 ********************************************************************************************/
00228 
00229 class OpLiveEffect : public SelOperation
00230 {
00231 // Give my name out in memory dumps.
00232 CC_DECLARE_DYNCREATE(OpLiveEffect);
00233 
00234     static BOOL             Init();
00235     static BOOL             UpdateCurrentEditor();
00236     static BOOL             DoCopyPPStackToSelection(UndoableOperation* pOp, EffectsStack* pPPStack, Document* pSrcDoc, Document* pDestDoc);
00237     static BOOL             DoLocaliseLiveEffects(UndoableOperation* pOp, Node* pNode);
00238     static BOOL             DoLocaliseEffectAttrs(UndoableOperation* pOp, Node* pNode);
00239     static BOOL             DoCopyEffectAttr(UndoableOperation* pOp, NodeAttribute* pAttr, Node* pNode);
00240     static Node*            DoDeleteAllPostProcessors(UndoableOperation* pOp, NodeRenderableInk* pNode, BOOL bDeleteOldControllers = FALSE, BOOL bDeleteBelowLocked = FALSE);
00241     static BOOL             DoDeletePostProcessor(UndoableOperation* pOp, Range* pRange);
00242     static BOOL             DoDeletePostProcessor(UndoableOperation* pOp, NodeEffect* pLE, BOOL bMoveEffectAttrs = FALSE);
00243 #ifdef FEATHER_EFFECT
00244     static ListRange*       DoApplyFeatherEffect(UndoableOperation* pOp,
00245                                                  Range* pSel,
00246                                                  String_256 strEffectID,
00247                                                  String_64 strDisplayName,
00248                                                  MILLIPOINT FeatherSize,
00249                                                  CProfileBiasGain Profile);
00250     static NodeFeatherEffect* DoApplyFeatherEffectNode(UndoableOperation* pOp,
00251                                                  Node* pSel,
00252                                                  String_256 strEffectID,
00253                                                  String_64 strDisplayName,
00254                                                  MILLIPOINT FeatherSize,
00255                                                  CProfileBiasGain Profile);
00256 #endif
00257     static BOOL                 DoCopyEffectsStack(UndoableOperation* pOp, Node* pDestNode, ListRange* pEffectsStack, Document* pSrcDoc, Document* pDestDoc);
00258     static NodeBitmapEffect*    DoApplyLiveEffect(UndoableOperation* pOp,
00259                                                   Node* pNode,
00260                                                   String_256 strEffectID,
00261                                                   String_64 strDisplayName,
00262                                                   double dResolution,
00263                                                   IXMLDOMDocumentPtr pEditsList = NULL,
00264                                                   BOOL bMakeLocked = FALSE);
00265     static BOOL                 DoCopyAttributes(UndoableOperation* pOp, Node* pSrcNode, Node* pDestNode, BOOL bEffectsOnly, Document* pSrcDoc, Document* pDestDoc);
00266 
00267 public:
00268     OpLiveEffect();
00269     ~OpLiveEffect();
00270 
00271     // the Op's Do() function.
00272     virtual void Do(OpDescriptor* pOpDesc);
00273     virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00274 
00275     ListRange*              GetLiveEffectList() {return m_pLERange;}
00276     virtual void            DoEndEdit(BOOL bChangingSelection = FALSE,
00277                                       BOOL bBroadcast = TRUE,
00278                                       BOOL bCancelled = FALSE,
00279                                       BOOL bEmpty = FALSE);
00280     BOOL                    GetPreviewQuality() const {return m_bPreviewQuality;}
00281     void                    SetPreviewQuality(BOOL bNew) {m_bPreviewQuality = bNew;}
00282                             
00283 protected:                  
00284     ListRange*              DoApplyLiveEffect(Range* pSel,
00285                                               String_256 strEffectID,
00286                                               String_64 strDisplayName,
00287                                               double dResolution,
00288                                               IXMLDOMDocumentPtr pEditsList = NULL,
00289                                               BOOL bMakeLocked = FALSE,
00290                                               BOOL bDetectDirectBitmaps = FALSE);
00291     virtual ListRange*      DoApplyLockedEffect(Range* pSel,
00292                                                 String_256 strEffectID,
00293                                                 String_64 strDisplayName,
00294                                                 double dResolution,
00295                                                 IXMLDOMDocumentPtr pEditsList = NULL,
00296                                                 BOOL bDetectDirectBitmaps = FALSE);
00297     BOOL                    EnsureLiveEffectOriginalBitmaps();
00298     BOOL                    GenerateBitmap(NodeBitmapEffect* pBitmapEffect,
00299                                            double dResolution,
00300                                            LPBITMAPINFO* ppInfo,
00301                                            LPBYTE* ppBits,
00302                                            DocRect* prectBounds);
00303     BOOL                    SetChanged(BOOL bNewState);
00304     BOOL                    HasChanged();
00305     BOOL                    IsTopOfStack(EffectsStack* pPPStack, INT32 iStackPos);
00306     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam) { return TRUE; }
00307     virtual BOOL            AllowEmptySelection() const { return FALSE; }
00308     virtual BOOL            CheckEffectOpParam(OpLiveEffectParam* pLEOpParam);
00309     virtual BOOL            DoEffectRangeOp(UINT32 idsProgress, Range* pLevel, OpLiveEffectParam* pParam);
00310     virtual BOOL            DoEffectNodeOp(NodeEffect* pEffect, OpLiveEffectParam* pParam, NodeBitmapEffect** ppNewEffect) {*ppNewEffect = NULL; return FALSE;}
00311                             
00312 // Member variables         
00313     ListRange*              m_pLERange;                 // List of LiveEffects/nodes we are working on - we DO own this list
00314     BOOL                    m_bAppliedNewEffects;
00315     String_256              m_strEffectID;              // Record the effect name for display if the Op works
00316     INT32                       m_iStackPos;                // Record the effect stack position for display if the Op works
00317     BOOL                    m_bPreviewQuality;          // True if this Op only needs preview quality rendering at the moment
00318 };
00319 
00320 /********************************************************************************************
00321 
00322 >   class OpApplyLiveEffect : public OpLiveEffect
00323 
00324     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00325     Created:    07/09/2004
00326     Purpose:    Operation to apply Bitmap Effect to the selection.
00327     See also:   
00328 
00329 ********************************************************************************************/
00330 class OpApplyLiveEffect : public OpLiveEffect
00331 {
00332 // Give my name out in memory dumps.
00333 CC_DECLARE_DYNCREATE(OpApplyLiveEffect);
00334 
00335 public:
00336     // query the op for information about itself.
00337     static OpState GetParamState(String_256* pstrDescription, OpDescriptor* pOpDesc, OpParam* pOpParam);
00338     virtual void GetOpName(String_256* pstrOpName);
00339 
00340     // the Op's Do() function.
00341 //  virtual void Do(OpDescriptor* pOpDesc);
00342     virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00343 
00344     // whether or not the Op may change the bounds of some nodes.
00345     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00346 
00347 };
00348 
00349 
00350 
00351 
00352 /********************************************************************************************
00353 
00354 >   class OpApplyFeatherEffect : public OpLiveEffect
00355 
00356     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00357     Created:    07/09/2004
00358     Purpose:    Operation to apply Bitmap Effect to the selection.
00359     See also:   
00360 
00361 ********************************************************************************************/
00362 #ifdef FEATHER_EFFECT
00363 class OpApplyFeatherEffect : public OpLiveEffect
00364 {
00365 // Give my name out in memory dumps.
00366 CC_DECLARE_DYNCREATE(OpApplyFeatherEffect);
00367 
00368 public:
00369     // query the op for information about itself.
00370     static OpState GetParamState(String_256* pstrDescription, OpDescriptor* pOpDesc, OpParam* pOpParam);
00371     virtual void GetOpName(String_256* pstrOpName);
00372 
00373     // the Op's Do() function.
00374 //  virtual void Do(OpDescriptor* pOpDesc);
00375     virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00376 
00377     // whether or not the Op may change the bounds of some nodes.
00378     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00379 
00380 };
00381 #endif
00382 
00383 
00384 
00385 /********************************************************************************************
00386 
00387 >   class OpEditLiveEffect : public OpLiveEffect
00388 
00389     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00390     Created:    10/09/2004
00391     Purpose:    Operation to apply Bitmap Effect to the selection.
00392     See also:   
00393 
00394 ********************************************************************************************/
00395 class OpEditLiveEffect : public OpLiveEffect
00396 {
00397 // Give my name out in memory dumps.
00398 CC_DECLARE_DYNCREATE(OpEditLiveEffect);
00399 
00400 public:
00401     // query the op for information about itself.
00402     static OpState GetParamState(String_256* pstrDescription, OpDescriptor* pOpDesc, OpParam* pOpParam);
00403 //  static OpState GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00404     virtual void GetOpName(String_256* pstrOpName);
00405 
00406     // the Op's Do() function.
00407 //  virtual void Do(OpDescriptor* pOpDesc);
00408 //  virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00409     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00410 
00411     // whether or not the Op may change the bounds of some nodes.
00412     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00413 
00414 protected:
00415     virtual BOOL AllowEmptySelection() const { return TRUE; }
00416 
00417 };
00418 
00419 
00420 
00421 
00422 /********************************************************************************************
00423 
00424 >   class OpDeleteLiveEffect : public OpLiveEffect
00425 
00426     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00427     Created:    10/09/2004
00428     Purpose:    Operation to apply Bitmap Effect to the selection.
00429     See also:   
00430 
00431 ********************************************************************************************/
00432 class OpDeleteLiveEffect : public OpLiveEffect
00433 {
00434 // Give my name out in memory dumps.
00435 CC_DECLARE_DYNCREATE(OpDeleteLiveEffect);
00436 
00437 public:
00438     // query the op for information about itself.
00439     static OpState GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00440     virtual void GetOpName(String_256* pstrOpName);
00441 
00442     // the Op's Do() function.
00443 //  virtual void Do(OpDescriptor* pOpDesc);
00444 //  virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00445     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00446 
00447     // whether or not the Op may change the bounds of some nodes.
00448     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00449 
00450 protected:
00451 //  BOOL        CanEditSelLiveEffect();
00452 
00453 };
00454 
00455 
00456 
00457 
00458 /********************************************************************************************
00459 
00460 >   class OpDeleteAllLiveEffect : public OpLiveEffect
00461 
00462     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00463     Created:    10/09/2004
00464     Purpose:    Operation to delete all Bitmap Effects on the selection.
00465     See also:   
00466 
00467 ********************************************************************************************/
00468 class OpDeleteAllLiveEffect : public OpLiveEffect
00469 {
00470 // Give my name out in memory dumps.
00471 CC_DECLARE_DYNCREATE(OpDeleteAllLiveEffect);
00472 
00473 public:
00474     // query the op for information about itself.
00475     static OpState GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00476     virtual void GetOpName(String_256* pstrOpName);
00477 
00478     // the Op's Do() function.
00479 //  virtual void Do(OpDescriptor* pOpDesc);
00480 //  virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00481     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00482 
00483     // whether or not the Op may change the bounds of some nodes.
00484     virtual BOOL            MayChangeNodeBounds() const { return TRUE; }
00485 
00486 protected:
00487     virtual BOOL            CheckEffectOpParam(OpLiveEffectParam* pLEOpParam);
00488 
00489 };
00490 
00491 
00492 
00493 
00494 /********************************************************************************************
00495 
00496 >   class OpEffectRes : public OpLiveEffect
00497 
00498     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00499     Created:    08/06/2005
00500     Purpose:    Operation to change effect resolution.
00501     See also:   
00502 
00503 ********************************************************************************************/
00504 class OpEffectRes : public OpLiveEffect
00505 {
00506 // Give my name out in memory dumps.
00507 CC_DECLARE_DYNCREATE(OpEffectRes);
00508 
00509 public:
00510     // query the op for information about itself.
00511     static OpState          GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00512     virtual void            GetOpName(String_256* pstrOpName);
00513     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00514     virtual BOOL            DoEffectNodeOp(NodeEffect* pEffect, OpLiveEffectParam* pParam, NodeBitmapEffect** ppNewEffect);
00515 
00516     // whether or not the Op may change the bounds of some nodes.
00517     virtual BOOL            MayChangeNodeBounds() const { return FALSE; }
00518 
00519 protected:
00520 //  BOOL        CanEditSelLiveEffect();
00521 
00522 };
00523 
00524 
00525 
00526 
00527 /********************************************************************************************
00528 
00529 >   class OpEffectLock : public OpLiveEffect
00530 
00531     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00532     Created:    08/06/2005
00533     Purpose:    Operation to change effect locked state.
00534     See also:   
00535 
00536 ********************************************************************************************/
00537 class OpEffectLock : public OpLiveEffect
00538 {
00539 // Give my name out in memory dumps.
00540 CC_DECLARE_DYNCREATE(OpEffectLock);
00541 
00542 public:
00543     // query the op for information about itself.
00544     static OpState          GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00545     virtual void            GetOpName(String_256* pstrOpName);
00546     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00547     virtual BOOL            DoEffectNodeOp(NodeEffect* pEffect, OpLiveEffectParam* pParam, NodeBitmapEffect** ppNewEffect);
00548 
00549     // whether or not the Op may change the bounds of some nodes.
00550     virtual BOOL            MayChangeNodeBounds() const { return FALSE; }
00551 
00552 protected:
00553     virtual BOOL            CopyEffectAttrs(NodeBitmapEffect* pSrcNode, NodeBitmapEffect* pDestNode);
00554 
00555 };
00556 
00557 
00558 
00559 
00560 /********************************************************************************************
00561 
00562 >   class OpEffectLockAll : public OpEffectLock
00563 
00564     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00565     Created:    08/06/2005
00566     Purpose:    Operation to change effect locked state.
00567     See also:   
00568 
00569 ********************************************************************************************/
00570 class OpEffectLockAll : public OpEffectLock
00571 {
00572 // Give my name out in memory dumps.
00573 CC_DECLARE_DYNCREATE(OpEffectLockAll);
00574 
00575 public:
00576     // query the op for information about itself.
00577     static OpState GetState(String_256* pstrDescription, OpDescriptor* pOpDesc);
00578     virtual void GetOpName(String_256* pstrOpName);
00579 
00580     // the Op's Do() function.
00581 //  virtual void Do(OpDescriptor* pOpDesc);
00582 //  virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00583     virtual BOOL            DoEffectOp(ListRange* pLevelRange, OpLiveEffectParam* pLEOpParam);
00584 
00585     // whether or not the Op may change the bounds of some nodes.
00586     virtual BOOL            MayChangeNodeBounds() const { return FALSE; }
00587 
00588 protected:
00589     virtual BOOL            CheckEffectOpParam(OpLiveEffectParam* pLEOpParam);
00590 
00591 };
00592 
00593 
00594 
00595 
00596 /********************************************************************************************
00597 
00598 >   class OpEditLegacyEffect : public Operation
00599 
00600     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00601     Created:    08/08/2005
00602     Purpose:    Hold all class for passing on requests to "edit" a legacy effect
00603     See also:   
00604 
00605 ********************************************************************************************/
00606 class OpEditLegacyEffect : public Operation
00607 {
00608 // Give my name out in memory dumps.
00609 CC_DECLARE_DYNCREATE(OpEditLegacyEffect);
00610 
00611 public:
00612     // query the op for information about itself.
00613     static OpState GetParamState(String_256* pstrDescription, OpDescriptor* pOpDesc, OpParam* pOpParam);
00614     virtual void GetOpName(String_256* pstrOpName);
00615 
00616     // the Op's Do() function.
00617     virtual void Do(OpDescriptor* pOpDesc);
00618     virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pOpParam);
00619 
00620 };
00621 
00622 
00623 
00624 
00625 /********************************************************************************************
00626 
00627 >   class ChangeEffectResAction : public Action
00628 
00629     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00630     Created:    09/06/2005
00631     Purpose:    An action to record/restore the current state of the LiveEffect EditList.
00632     SeeAlso:    
00633 
00634 ********************************************************************************************/
00635 
00636 class ChangeEffectResAction : public Action
00637 {
00638 
00639 CC_DECLARE_DYNCREATE(ChangeEffectResAction)
00640 
00641 public:
00642     ChangeEffectResAction();
00643     ~ChangeEffectResAction();
00644     virtual ActionCode Execute();
00645     static ActionCode Init( Operation* pOp,
00646                             ActionList* pActionList,
00647                             Action** NewAction);
00648     static BOOL CreateChangeEffectResAction(Operation* pOp,
00649                                       NodeBitmapEffect* pEffectNode,
00650                                       double dResolution
00651                                      );
00652     // Data members
00653     NodeBitmapEffect*       m_pEffectNode;
00654     double                  m_dResolution;
00655 };
00656 
00657 
00658 
00659 
00660 /********************************************************************************************
00661 
00662 >   class ToggleLockAction : public Action
00663 
00664     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00665     Created:    13/06/2005
00666     Purpose:    An action to record/restore the current state of the LiveEffect EditList.
00667     SeeAlso:    
00668 
00669 ********************************************************************************************/
00670 
00671 /*class ToggleLockAction : public Action
00672 {
00673 
00674 CC_DECLARE_DYNCREATE(ToggleLockAction)
00675 
00676 public:
00677     ToggleLockAction();
00678     ~ToggleLockAction();
00679     virtual ActionCode Execute();
00680     static ActionCode Init( Operation* pOp,
00681                             ActionList* pActionList,
00682                             Action** NewAction);
00683     static BOOL CreateToggleLockAction(Operation* pOp,
00684                                       NodeBitmapEffect* pEffectNode,
00685                                       BOOL bNewLockedState
00686                                      );
00687     // Data members
00688     NodeBitmapEffect*       m_pEffectNode;
00689     double                  m_bLockedState;
00690 };*/
00691 
00692 
00693 
00694 
00695 /********************************************************************************************
00696 
00697 >   class MarkEditListAction : public Action
00698 
00699     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00700     Created:    17/09/2004
00701     Purpose:    An action to record/restore the current state of the LiveEffect EditList.
00702     SeeAlso:    
00703 
00704 ********************************************************************************************/
00705 
00706 class MarkEditListAction : public Action
00707 {
00708 
00709 CC_DECLARE_DYNCREATE(MarkEditListAction)
00710 
00711 public:
00712     MarkEditListAction();
00713     ~MarkEditListAction();
00714     virtual ActionCode Execute();
00715     static ActionCode Init( Operation* pOp,
00716                             ActionList* pActionList,
00717                             Action** NewAction);
00718     static ActionCode DoMarkEditList(Operation* pOp,
00719                                       ActionList* pActionList,
00720                                       EffectsStack* pPPStack,
00721                                       INT32 iStackPos
00722                                      );
00723     // Data members
00724     IXMLDOMDocumentPtr      pEditList;
00725     INT32                       iStackPos;
00726 };
00727 
00728 
00729 
00730 
00731 #endif  // INC_OPLIVEFX

Generated on Sat Nov 10 03:47:49 2007 for Camelot by  doxygen 1.4.4