blndtool.h

Go to the documentation of this file.
00001 // $Id: blndtool.h 1386 2006-06-28 17:49:55Z 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 // Header for the blend tool implementation
00099 
00100 #ifndef INC_BLENDTOOL
00101 #define INC_BLENDTOOL
00102 
00103 //#include "tool.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00104 //#include "doccoord.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00105 //#include "bars.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00106 #include "blendatt.h"
00107 //#include "selop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 #include "biasgdgt.h"
00109 //#include "iprofile.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00110 //#include "biasgain.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00111 #include "nodershp.h"
00112 //#include "range.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00113 //#include "matrix.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00114 //#include "selstate.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00115 #include "dragtool.h"
00116 
00117 class Cursor;
00118 class Spread;
00119 class BlendInfoBarOp;
00120 class Node;
00121 class NodeBlend;
00122 class NodeBlender;
00123 class BlendPath;
00124 class CompoundNodeTreeFactory;
00125 
00126 #define OPTOKEN_BLENDNODES          _T("BlendNodes")
00127 #define OPTOKEN_REMOVEBLEND         _T("RemoveBlend")
00128 #define OPTOKEN_CHANGEBLENDSTEPS    _T("ChangeBlendSteps")
00129 #define OPTOKEN_CHANGEBLEND         _T("ChangeBlendFlag")
00130 #define OPTOKEN_BLENDONETOONE       _T("BlendOneToOne")
00131 #define OPTOKEN_BLENDANTIALIAS      _T("BlendAntialias")
00132 #define OPTOKEN_BLENDTANGENTIAL     _T("BlendTangential")
00133 #define OPTOKEN_ADDBLENDPATH        _T("AddBlendPath")
00134 #define OPTOKEN_DETACHBLENDPATH     _T("DetachBlendPath")
00135 #define OPTOKEN_CHANGEBLENDPROFILE  _T("ChangeBlendProfile")
00136 #define OPTOKEN_EDITBLENDENDOBJECT  _T("EditBlendEndobject")
00137 #define OPTOKEN_CHANGEBLENDDISTANCE  _T("EditDistanceBetweenSteps")
00138 
00139 
00140 
00141 /********************************************************************************************
00142 
00143 >   class CompoundNodeTreeFactoryListItem : public ListItem
00144 
00145     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00146     Created:    9/8/99
00147     Purpose:    Item in the CompoundNodeClassFactoryList 
00148 
00149 ********************************************************************************************/
00150 class CompoundNodeTreeFactoryListItem : public ListItem
00151 {
00152 public:
00153     CompoundNodeTreeFactory * pFactory;
00154 } ;
00155 
00156 /********************************************************************************************
00157 
00158 >   class CompoundNodeTreeFactoryList : public List
00159 
00160     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00161     Created:    9/8/99
00162     Purpose:    A list of the compound node factories necessary to regenerate the shadow/
00163                 bevels/other compound nodes after bevelling
00164 
00165 ********************************************************************************************/
00166 class CompoundNodeTreeFactoryList : public List
00167 {
00168 public:
00169     ~CompoundNodeTreeFactoryList();
00170 
00171     void AddItem(CompoundNodeTreeFactory *pItem);
00172     CompoundNodeTreeFactory * GetItem(INT32 index);
00173 } ;
00174 
00175 /********************************************************************************************
00176 
00177 >   class BlenderInfoItem : public ListItem
00178 
00179     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00180     Created:    14/11/94
00181     Purpose:    Holds info on a given blender.
00182                 This is used when blending a blend to a blend, or a blend to an object, as
00183                 all the NodeBlenders in a given NodeBlend have to be temporarily deinitialised while
00184                 the objects are contatinated.
00185     SeeAlso:    ListItem
00186 
00187 ********************************************************************************************/
00188 
00189 class BlenderInfoItem: public ListItem
00190 {
00191     CC_DECLARE_MEMDUMP(BlenderInfoItem);
00192 public:
00193     BlenderInfoItem() { pNodeBlender = NULL; pNodeStart = pNodeEnd = NULL; }
00194 
00195     NodeBlender*        pNodeBlender;
00196     NodeRenderableInk*  pNodeStart;
00197     NodeRenderableInk*  pNodeEnd;
00198 
00199     BlenderInfoItem* SimpleCopy()   {   BlenderInfoItem *pItem = new BlenderInfoItem;
00200                                         if (pItem != NULL)
00201                                         {
00202                                             pItem->pNodeBlender = pNodeBlender;
00203                                             pItem->pNodeStart   = pNodeStart;
00204                                             pItem->pNodeEnd     = pNodeEnd;
00205                                         }
00206                                         return pItem;
00207                                     }
00208 };
00209 
00210 
00211 
00212 
00213 
00214 /********************************************************************************************
00215 
00216 >   class BlendToolRef : public CC_CLASS_MEMDUMP
00217 
00218     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00219     Created:    11/10/94
00220     Purpose:    A class that represents a start or end of a blend.
00221                 The start ref is used when a click occurs.
00222                 The end ref is used at the end of a drag.
00223 
00224 ********************************************************************************************/
00225 
00226 class BlendToolRef : public CC_CLASS_MEMDUMP
00227 {
00228 CC_DECLARE_MEMDUMP(BlendToolRef)
00229 
00230 public:
00231     BlendToolRef() { Reset(); }
00232     void Reset() {  pNode       = NULL;
00233                     pNodeBlend  = NULL;
00234                     pBlendPath  = NULL;
00235                     pSpread     = NULL;
00236                     RemapRef    = 0;
00237                     Index       = -1;
00238                  }
00239 
00240 
00241     NodeRenderableInk*      pNode;
00242     NodeBlend*              pNodeBlend;
00243     BlendPath*              pBlendPath;
00244     Spread*                 pSpread;
00245     UINT32                  RemapRef;
00246     INT32                   Index;
00247     BOOL                    AStartNode;
00248     DocCoord                PointerPos;
00249 };
00250 
00251 
00252 /********************************************************************************************
00253 
00254 >   class BlendTool : public Tool_v1
00255 
00256     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00257     Created:    4/10/94
00258     Purpose:    The blend tool class
00259 
00260 ********************************************************************************************/
00261 
00262 class CCAPI BlendTool : public DragTool
00263 {
00264 // Give tool name in memory dumps
00265 CC_DECLARE_MEMDUMP(BlendTool);
00266 
00267 public:
00268     BlendTool();
00269     ~BlendTool();
00270 
00271     // Standard calls your tool must provide
00272     BOOL Init();
00273     void Describe(void* InfoPtr);
00274     UINT32 GetID() { return TOOLID_BLEND; };
00275     
00276     // Some very common event handlers
00277     void SelectChange(BOOL isSelected);
00278     void OnClick( DocCoord, ClickType, ClickModifiers, Spread* );
00279     void OnMouseMove(DocCoord PointerPos,Spread* pSpread,ClickModifiers ClickMods);
00280     void RenderToolBlobs(Spread* pSpread,DocRect* pDocRect);
00281     BOOL GetStatusLineText(String_256* ptext, Spread*, DocCoord, ClickModifiers);
00282     BOOL OnKeyPress(KeyPress* pKeyPress);
00283 
00284     // Some useful static functions
00285     static BlendInfoBarOp*  GetBlendInfoBarOp() { return pBlendInfoBarOp; }
00286     static BOOL             IsCurrent();
00287     static void             DisplayStatusBarHelp(UINT32 StatusID);
00288 
00289     static BlendToolRef*    GetPtrRefStart()    { return pRefStart; }
00290     static BlendToolRef*    GetPtrRefEnd()      { return pRefEnd; }
00291 
00292     static void UpdateRef(BlendToolRef* pRef,Spread* pSpread, DocCoord PointerPos,BOOL CheckNodeUnderPoint = TRUE);
00293     static void UpdateCursorAndStatus();
00294     static void CheckNodeRemapping(BlendToolRef* pRefStart, BlendToolRef* pRefEnd);
00295 
00296     // determines whether the pointer is in the right place to edit the 
00297     // end object of a blend on a path
00298     BOOL EditBlendEndAndUpdateCursor(Spread* pSpread, DocCoord PointerPos);
00299     // lightweight version doesn't update cursor
00300     BOOL EditBlendEnd(Spread* pSpread, DocCoord PointerPos);
00301 
00302     BOOL SelectedBlendIsOnCurve();
00303     void UpdateInfobar();
00304 private:
00305 
00306     // Private blend tool functions
00307     static NodeRenderableInk*   FindObject(Spread* pSpread, DocCoord ClickPos);
00308     static BOOL                 IsPointOverPathBlob(DocCoord* pPointerPos,BlendToolRef* pRef);
00309     static BOOL                 IsPointOverBlendBlob(DocCoord* pPointerPos,BlendToolRef* pRef);
00310 
00311     BOOL CreateCursors();                       // Create your tool's cursors in this func
00312     void DestroyCursors();                      // Destroys all blend tool cursors
00313 
00314     
00315     // added by Diccon 3/9/99
00316     ShapeClickEffect DetermineClickEffect(DocCoord PointerPos, Spread* pSpread, NodeRegularShape** ReturnShape);
00317     BOOL RenderSelectInsideBlobs(RenderRegion* pRender, NodeRenderableInk* pNode);
00318 
00319 
00320     static BlendInfoBarOp*  pBlendInfoBarOp;    // Ptr to your tool's infobar
00321     
00322     BOOL m_EditEndObject;                       // flag to say whether we wish to edit the end objects when dragging
00323 
00324     // Cursors
00325     static Cursor*  pcNormalCursor;                     // Your standard cursor to use when your tool becomes active
00326     static Cursor*  pcBlendableCursor;                  // Cursor when mouse is over object that can be blended
00327     static Cursor*  pcBlendableBlobCursor;              // Cursor when mouse is over the blob of a selected path
00328     static Cursor*  pcBlendableRemapCursor;             // Cursor when mouse is over remappable blobs of a blend            
00329                                                         
00330     static Cursor*  pcCurrentCursor;                    // The cursor your tool is currently displaying
00331     static INT32        CurrentCursorID;                    // The ID of our current cursor on the stack
00332 
00333     // Status line text ID
00334     static UINT32   StatusID;
00335 
00336     // Data gathered during clicking and dragging
00337     static BlendToolRef *pRefStart;
00338     static BlendToolRef *pRefEnd;
00339 
00340     // Standard tool static vars
00341     static  TCHAR* FamilyName;              // The Tools Family Name
00342     static  TCHAR* ToolName;                    // The Tool Name
00343     static  TCHAR* Purpose;                 // What the tool is for
00344     static  TCHAR* Author;                  // Who wrote it
00345 };
00346 
00347 
00348 //-----------------------------------------------
00349 //-----------------------------------------------
00350 //-----------------------------------------------
00351 //-----------------------------------------------
00352 
00353 
00354 /********************************************************************************************
00355 
00356 >   class BlendInfoBarOp : public InformationBarOp
00357 
00358     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00359     Created:    4/10/94   changed 16/9/99 Diccon Yamanaka
00360     Purpose:    Class for handling the tool's information bar.
00361 
00362 ********************************************************************************************/
00363 
00364 class BlendInfoBarOp : public InformationBarOp
00365 {
00366     CC_DECLARE_DYNCREATE( BlendInfoBarOp )  
00367     //friend class BlendTool;
00368 public:
00369     BlendInfoBarOp() { m_DetachBlendPath = FALSE; m_EditBlendSteps = TRUE;  m_BlendedOnCurve = FALSE;
00370                         m_BlendAntiAlias = TRUE, m_OneToOne = FALSE; m_Tangential = FALSE;
00371                         DlgResID = _R(IDD_BLENDTOOLBAR);
00372                      };
00373 
00374     virtual void UpdateState();     // Overrides the empty function in InformationBarOp
00375     void UpdateInfoBarState();      // does the actual updating
00376 //  void ApplyOneToOne(BOOL State); // Sets the one-to-one state of all the selected blends
00377 //  void ApplyAntialias(BOOL State);// Sets the antialias blend steps state of all the selected blends
00378 
00379     MsgResult   Message(Msg* Msg);  // All messages to the info bar come through here
00380     
00381     // DY 9/99 
00382     NodeBlend* GetBlendOnCurve(); // if the selection is a blend on a path this returns the blend
00383     static BOOL NonBlendsSelected();
00384     void EnableBlendSelectedGadgets(BOOL Enable);
00385     void LoadStringsIntoEffectCombo();
00386     void ShowEffectComboString(ColourBlendType Type);
00387 private:
00388 
00389     void ChangeBitmapButtonState(CGadgetID GadgetID, BOOL* CurrentState); //DY 13/9/99 function to change the state of a bitmap button, 
00390     
00391     void ChangeProfile(CProfileBiasGain* Profile, CGadgetID GadgetID);
00392     void ChangeProfileOnIdle(CProfileBiasGain* Profile, CGadgetID GadgetID);
00393     
00394     // DY, 25/9/99 to set the text in the edit field 
00395     void SetBlendStepsEditText(INT32 NumSteps);
00396     void SetBlendDistanceEditText(INT32 NumSteps);
00397 
00398     BOOL GetDistanceEntered( double* Distance);  // returns the value set in the edit field
00399     BOOL IsStepDistanceValid (UINT32 MinValue, UINT32 MaxValue, double Distance);  // sets the DistanceEntered member of all selected blends
00400 
00401     NodeBlender* GetBlender();  // returns the first nodeblender of the selected blend
00402     NodeBlend* GetNodeBlend();  // returns the first nodeblend of the selection
00403     BOOL GetNumSteps( UINT32 MinValue, UINT32 MaxValue, INT32* NumSteps);       
00404     BOOL GetNumStepsFromDistance(UINT32 MinValue, UINT32 MaxValue, INT32* NumSteps);            
00405     
00406     
00407     BOOL GetMeanBlendDistance(double* Distance);  // returns the length of the currently selected blend
00408     BOOL AllBlendsHaveSameNumSteps();    // returns whether or not all selected blends have the same number of steps
00409     BOOL AllBlendsHaveSameDistance();    
00410 
00411     void SetBlendEditState(EditState State);  // sets the edit state of all selected blends
00412 
00413     BOOL CheckSelectionAndSet(); // restores the selection if we have been editing a blend on a path
00414 
00415     CProfileBiasGain* GetProfileFromSelection(CGadgetID GadgetID, BOOL* bMany, BOOL* bAllSameType);
00416     NodeBlend* GetCurrentNodeBlend();
00417     INT32 AttributeIndexModifier(INT32 CurrentIndex);
00418 
00419     BOOL m_DetachBlendPath;
00420     BOOL m_EditBlendSteps;   //DY 13/9/99 this is really ugly but I can't get 
00421                              // get any sense out of interrogating the 
00422                               // gadgets directly so keep flags to remember where we are
00423     BOOL m_BlendAntiAlias;
00424     BOOL m_OneToOne;
00425     BOOL m_Tangential;
00426     BOOL m_BlendedOnCurve;
00427 
00428     public:
00429 
00430     CBiasGainGadget  m_BiasGainGadgetPosition;  // the profile gadget added 16/9/99
00431     CBiasGainGadget  m_BiasGainGadgetAttribute;
00432 
00433 };
00434 
00435 /********************************************************************************************
00436 
00437 >   class BlendInfoBarOpCreate : public BarCreate
00438 
00439     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00440     Created:    4/10/94
00441     Purpose:    Class for creating BlendInfoBarOps.
00442                 Derived classes of BarCreate are used by DialogBarOp::ReadBarsFromFile()
00443 
00444 ********************************************************************************************/
00445 
00446 class BlendInfoBarOpCreate : public BarCreate
00447 {
00448 public:
00449     DialogBarOp* Create() { return (new BlendInfoBarOp); }
00450 };
00451 
00452 //-----------------------------------------------------------------
00453 //-----------------------------------------------------------------
00454 //-----------------------------------------------------------------
00455 //-----------------------------------------------------------------
00456 
00457 /********************************************************************************************
00458 
00459 >   class OpBlendNodes : public SelOperation
00460 
00461     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00462     Created:    11/10/94
00463     Purpose:    Operation for blending two arbitrary objects together
00464 
00465 ********************************************************************************************/
00466 
00467 enum OpBlendOpType {    BLENDOPTYPE_NONE,           // No type - used on op construction
00468                         BLENDOPTYPE_NEW,            // A newly created blend object
00469                         BLENDOPTYPE_REMAP,          // A remapping of points
00470                         BLENDOPTYPE_BLENDANDOBJECT, // Blending a blend with an object
00471                         BLENDOPTYPE_BLENDANDBLEND,  // Blending a blend with another blend
00472                         BLENDOPTYPE_BLENDBLENDONPATH, //Blending a blend on a path
00473                     };
00474 
00475 class OpBlendNodes : public SelOperation
00476 {
00477 CC_DECLARE_DYNCREATE(OpBlendNodes);
00478 
00479 public:
00480     // Construction/Destruction
00481     OpBlendNodes();                     
00482     ~OpBlendNodes();
00483 
00484     // The all important Do functions
00485     BOOL DoDrag(BlendTool* pBlendTool);
00486     virtual BOOL SnappingDrag() { return FALSE; }
00487     
00488     // Virtual functions needed for the dragging operations to work
00489     virtual void DragPointerMove( DocCoord PointerPos, ClickModifiers ClickMods, Spread*, BOOL bSolidDrag);
00490     virtual void DragFinished(  DocCoord PointerPos, 
00491                                 ClickModifiers ClickMods, Spread*, 
00492                                 BOOL Success, BOOL bSolidDrag);
00493 
00494     // Some Render functions to will draw the EORed drag box
00495     void RenderMyDragBlobs();
00496     void RenderDragBlobs(DocRect Rect,Spread* pSpread, BOOL bSolidDrag);
00497         
00498     // These functions required for the OpDescriptor class
00499     static BOOL Declare();
00500     static OpState GetState(String_256* Description, OpDescriptor*);
00501 
00502     void GetOpName(String_256* OpName);
00503 
00504     // Undo and redo calls
00505     virtual BOOL Undo();
00506     virtual BOOL Redo();
00507 
00508     // Public support funcs
00509     BOOL RecordBlenderInfo(List& BlenderList,NodeBlend* pNodeBlend);
00510     void DeinitBlenders(List& BlenderList);
00511     BOOL ReinitBlenders(List& BlenderList);
00512 //  BOOL DeinitAndReinitBlend(NodeBlend* pThisNodeBlend);
00513 
00514     // Diccon 9/99 when blending from one blend to another, this retrieves the child
00515     // of the blend that is closest to the drag point, for either the start or the end blend
00516     BOOL GetNodeClosestToPoint(NodeRenderableInk** ppInk, BOOL StartBlend);
00517 
00518 private:
00519     // The hard working Do functions
00520     BOOL DoBlendObjects();
00521     BOOL DoCreateBlender(   NodeRenderableInk* pNodeStart,INT32 IndexStart,
00522                             NodeRenderableInk* pNodeEnd,INT32 IndexEnd,
00523                             Node* pContextNode, AttachNodeDirection AttachDir);
00524     BOOL DoRemapBlend();
00525     BOOL DoBlendBlendAndObject();
00526     BOOL DoBlendBlendAndBlend();
00527     BOOL DoDeinitBlenders(List& BlenderList);
00528     BOOL DoReinitBlenders(List& BlenderList);
00529 
00530     BOOL DeterminBlendObjectsProcessorHit ();
00531 
00532     // Member vars of the operation 
00533     BlendToolRef*   pRefStart;
00534     BlendToolRef*   pRefEnd;
00535 
00536     OpBlendOpType   OpType;
00537 
00538     // Data stored that can be used during Undo/Redo
00539     NodeBlend* pNodeBlend;
00540     NodeBlend* pNodeBlendStart;
00541     NodeBlend* pNodeBlendEnd;
00542 
00543     BlendTool* m_pBlendTool;
00544 
00545     // DMc - removes all shadows & bevels from the blend nodes
00546     BOOL RemoveCompoundNodes(CompoundNodeTreeFactoryList * pList);
00547 
00548     // helper function for the above (see cpp file)
00549     BOOL RemoveCompoundNodesFromNode(Node * pNode, Node ** pRetnNode,
00550         CompoundNodeTreeFactoryList * pList);
00551 
00552     // creates a contour node
00553     BOOL DoContourNode(Node * pNode, DocCoord PointerPos, UINT32 Steps);
00554     
00555 };
00556 
00557 /********************************************************************************************
00558 
00559 >   class OpAddBlendPath : public SelOperation
00560 
00561     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00562     Created:    28/4/99
00563     Purpose:    Adds a blend path to the selected blends
00564 
00565 ********************************************************************************************/
00566 
00567 class OpAddBlendPath : public SelOperation
00568 {
00569 CC_DECLARE_DYNCREATE(OpAddBlendPath);
00570 
00571 public:
00572     // Construction/Destruction
00573     OpAddBlendPath()  {}
00574     ~OpAddBlendPath() {}
00575 
00576     // These functions required for the OpDescriptor class
00577     static BOOL Declare();
00578     static OpState GetState(String_256* Description, OpDescriptor*);
00579 
00580     // The all-important Do() func
00581     virtual void Do(OpDescriptor*);
00582     virtual void GetOpName(String_256* OpName);
00583 
00584     /* DY 16/9 when blending to a curve we need to know if path to 
00585     blend to is to be rendered on top or not */
00586     BOOL IsBlendPathOnTopOfBlend(SelRange* pSel);
00587 
00588 };
00589 
00590 /********************************************************************************************
00591 
00592 >   class OpDetachBlendPath : public SelOperation
00593 
00594     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00595     Created:    11/5/99
00596     Purpose:    Detached the blend path from each of the selected blends
00597 
00598 ********************************************************************************************/
00599 
00600 class OpDetachBlendPath : public SelOperation
00601 {
00602 CC_DECLARE_DYNCREATE(OpDetachBlendPath);
00603 
00604 public:
00605     // Construction/Destruction
00606     OpDetachBlendPath()  {}
00607     ~OpDetachBlendPath() {}
00608 
00609     // These functions required for the OpDescriptor class
00610     static BOOL Declare();
00611     static OpState GetState(String_256* Description, OpDescriptor*);
00612 
00613     // The all-important Do() func
00614     virtual void Do(OpDescriptor*);
00615     virtual void GetOpName(String_256* OpName);
00616 };
00617 
00618 /********************************************************************************************
00619 
00620 >   class OpRemoveBlend : public SelOperation
00621 
00622     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00623     Created:    4/11/94
00624     Purpose:    This removes the selected blend objects, leaving the original objects in the tree
00625 
00626 ********************************************************************************************/
00627 
00628 class OpRemoveBlend : public SelOperation
00629 {
00630 CC_DECLARE_DYNCREATE(OpRemoveBlend);
00631 
00632 public:
00633     // Construction/Destruction
00634     OpRemoveBlend()  {}
00635     ~OpRemoveBlend() {}
00636 
00637     // These functions required for the OpDescriptor class
00638     static BOOL Declare();
00639     static OpState GetState(String_256* Description, OpDescriptor*);
00640 
00641     // The all-important Do() func
00642     virtual void Do(OpDescriptor*);
00643     virtual void GetOpName(String_256* OpName);
00644 };
00645 
00646 /********************************************************************************************
00647 
00648 >   class OpChangeBlendSteps : public SelOperation
00649 
00650     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00651     Created:    4/11/94
00652     Purpose:    This changes the number of steps of the selected blends
00653 
00654 ********************************************************************************************/
00655 
00656 class OpChangeBlendSteps : public SelOperation
00657 {
00658 CC_DECLARE_DYNCREATE(OpChangeBlendSteps);
00659 
00660 public:
00661     // Construction/Destruction
00662     OpChangeBlendSteps()  {}
00663     ~OpChangeBlendSteps() {}
00664 
00665     // These functions required for the OpDescriptor class
00666     static BOOL Declare();
00667     static OpState GetState(String_256* Description, OpDescriptor*);
00668 
00669     // The all-important Do() func
00670     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00671     virtual void GetOpName(String_256* OpName);
00672 
00673     // Karim 21/01/2000 - see UndoableOperation base implementation.
00674     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00675 
00676     BOOL DeterminBlendObjectsProcessorHit (OpParam* pOpParam, List* nodeList);
00677 };
00678 
00679 
00680 
00681 /********************************************************************************************
00682 
00683 >   class ChangeBlendStepsAction : public Action
00684 
00685     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00686     Created:    4/11/94
00687     Purpose:    An action which undoes the modification of a path's filled bit (or redoes it)
00688                 It can also be used to undo the IsStroked flag as well.
00689     SeeAlso:    -
00690 
00691 ********************************************************************************************/
00692 
00693 class ChangeBlendStepsAction : public Action
00694 {
00695 
00696 CC_DECLARE_DYNCREATE(ChangeBlendStepsAction)
00697 
00698 public:
00699     ChangeBlendStepsAction();
00700     ~ChangeBlendStepsAction();
00701     virtual ActionCode Execute();
00702     static ActionCode Init( Operation* pOp,
00703                             ActionList* pActionList,
00704                             Node* pThisNodeBlend,
00705                             UINT32 NumSteps,
00706                             double DistanceEntered,
00707                             ChangeBlendStepsAction** NewAction);
00708 protected:
00709     Node*       pNodeBlend;
00710     UINT32      OldNumSteps;
00711     double      OldDistanceEntered;
00712 };
00713 
00714 
00715 /********************************************************************************************
00716 
00717 >   class RemapBlendAction : public Action
00718 
00719     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00720     Created:    11/11/94
00721     Purpose:    An action which undoes the remapping of a blend
00722     SeeAlso:    -
00723 
00724 ********************************************************************************************/
00725 
00726 class RemapBlendAction : public Action
00727 {
00728 
00729 CC_DECLARE_DYNCREATE(RemapBlendAction)
00730 
00731 public:
00732     RemapBlendAction();
00733     ~RemapBlendAction();
00734     virtual ActionCode Execute();
00735     static ActionCode Init( Operation* pOp,
00736                             ActionList* pActionList,
00737                             NodeBlend* pNodeBlend,
00738                             UINT32 RemapRef,
00739                             DocCoord PosStart,
00740                             DocCoord PosEnd,
00741                             RemapBlendAction** NewAction);
00742 protected:
00743     NodeBlend*          pNodeBlend;
00744     UINT32              RemapRef;
00745     DocCoord            InvPosStart;
00746     DocCoord            InvPosEnd;
00747 };
00748 
00749 
00750 /********************************************************************************************
00751 
00752 >   class InitBlendersAction : public Action
00753 
00754     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00755     Created:    21/11/94
00756     Purpose:    An action which deinits or reinits a blend
00757     SeeAlso:    -
00758 
00759 ********************************************************************************************/
00760 
00761 class InitBlendersAction : public Action
00762 {
00763 
00764 CC_DECLARE_DYNCREATE(InitBlendersAction)
00765 
00766 public:
00767     InitBlendersAction();
00768     ~InitBlendersAction();
00769     virtual ActionCode Execute();
00770     static ActionCode Init( OpBlendNodes* pOp,
00771                             ActionList* pActionList,
00772                             List* pBlenderInfoList,
00773                             BOOL DeinitState,
00774                             InitBlendersAction** NewAction);
00775 protected:
00776     List                BlenderInfoList;
00777     BOOL                Deinit;
00778 };
00779 
00780 //-------------------------------------------------------
00781 //-------------------------------------------------------
00782 //-------------------------------------------------------
00783 
00784 enum ChangeBlendType {  CHANGEBLEND_NONE, 
00785                         CHANGEBLEND_ONETOONE, 
00786                         CHANGEBLEND_ANTIALIAS, 
00787                         CHANGEBLEND_COLOURBLENDTYPE,
00788                         CHANGEBLEND_TANGENTIAL, 
00789                         CHANGEBLEND_OBJECTPROFILE,
00790                         CHANGEBLEND_ATTRPROFILE, 
00791                         CHANGEBLEND_BLENDONPATH,
00792                         CHANGEBLEND_EDITEND };
00793 
00794 /********************************************************************************************
00795 
00796 >   class OpChangeBlend : public SelOperation
00797 
00798     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00799     Created:    6/12/94
00800     Purpose:    This changes aspects of all selected blends
00801 
00802 ********************************************************************************************/
00803 
00804 class OpChangeBlend : public SelOperation
00805 {
00806 CC_DECLARE_DYNCREATE(OpChangeBlend);
00807 
00808 public:
00809     // Construction/Destruction
00810     OpChangeBlend()                     { ChangeType = CHANGEBLEND_NONE; }
00811 //  OpChangeBlend(ChangeBlendType Type) { ChangeType = Type; }
00812     ~OpChangeBlend() {}
00813 
00814     // These functions required for the OpDescriptor class
00815     static BOOL Declare();
00816     static OpState GetState(String_256* Description, OpDescriptor*);
00817 
00818     // The all-important Do() func
00819     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00820     virtual void GetOpName(String_256* OpName);
00821 
00822     ChangeBlendType GetChangeType () { return (ChangeType); }   // required for undo/redo
00823 
00824 private:
00825     ChangeBlendType ChangeType;
00826 };
00827 
00828 /********************************************************************************************
00829 
00830 >   class OpBlendOneToOne : public OpChangeBlend
00831 
00832     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00833     Created:    15/5/94
00834     Purpose:    This changes the one-to-one flag of all selected blends
00835 
00836 ********************************************************************************************/
00837 
00838 class OpBlendOneToOne : public OpChangeBlend
00839 {
00840 CC_DECLARE_DYNCREATE(OpBlendOneToOne);
00841 
00842 public:
00843     // Construction/Destruction
00844     OpBlendOneToOne()  {}
00845     ~OpBlendOneToOne() {}
00846 
00847     // These functions required for the OpDescriptor class
00848     static BOOL Declare();
00849     static OpState GetState(String_256* Description, OpDescriptor*);
00850 
00851     // The all-important Do() func
00852     virtual void Do(OpDescriptor*);
00853 };
00854 
00855 /********************************************************************************************
00856 
00857 >   class OpBlendAntialias : public OpChangeBlend
00858 
00859     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00860     Created:    15/5/94
00861     Purpose:    This changes the one-to-one flag of all selected blends
00862 
00863 ********************************************************************************************/
00864 
00865 class OpBlendAntialias : public OpChangeBlend
00866 {
00867 CC_DECLARE_DYNCREATE(OpBlendAntialias);
00868 
00869 public:
00870     // Construction/Destruction
00871     OpBlendAntialias()  {}
00872     ~OpBlendAntialias() {}
00873 
00874     // These functions required for the OpDescriptor class
00875     static BOOL Declare();
00876     static OpState GetState(String_256* Description, OpDescriptor*);
00877 
00878     // The all-important Do() func
00879     virtual void Do(OpDescriptor*);
00880 };
00881 
00882 /********************************************************************************************
00883 
00884 >   class OpBlendTangential : public OpChangeBlend
00885 
00886     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00887     Created:    21/5/99
00888     Purpose:    This changes the Tangential flag of all selected blends
00889 
00890 ********************************************************************************************/
00891 
00892 class OpBlendTangential : public OpChangeBlend
00893 {
00894 CC_DECLARE_DYNCREATE(OpBlendTangential);
00895 
00896 public:
00897     // Construction/Destruction
00898     OpBlendTangential()  {}
00899     ~OpBlendTangential() {}
00900 
00901     // These functions required for the OpDescriptor class
00902     static BOOL Declare();
00903     static OpState GetState(String_256* Description, OpDescriptor*);
00904 
00905     // The all-important Do() func
00906     virtual void Do(OpDescriptor*);
00907 };
00908 
00909 
00910 /********************************************************************************************
00911 
00912 >   class OpEditBlendEndObject : public OpChangeBlend
00913 
00914     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com> yamanaka
00915     Created:    6/9/99
00916     Purpose:    The operation to edit the position of the end objects of a blend on a path
00917 ********************************************************************************************/
00918 
00919 class OpEditBlendEndObject : public SelOperation
00920 {
00921 CC_DECLARE_DYNCREATE(OpEditBlendEndObject);
00922 
00923 public:
00924     OpEditBlendEndObject() {}
00925     OpEditBlendEndObject(BlendTool* pBlendTool);
00926     ~OpEditBlendEndObject();
00927 
00928     // These functions required for the OpDescriptor class
00929     static BOOL Declare();
00930     static OpState GetState(String_256* Description, OpDescriptor*);
00931 
00932 
00933     virtual void GetOpName(String_256* OpName);
00934 
00935     // Virtual functions needed for the dragging operations to work
00936     virtual void DragPointerMove( DocCoord PointerPos, ClickModifiers ClickMods, Spread*, BOOL bSolidDrag);
00937     virtual void DragFinished(  DocCoord PointerPos, 
00938                                 ClickModifiers ClickMods, Spread*, 
00939                                 BOOL Success, BOOL bSolidDrag);
00940     virtual void DragPointerIdle(DocCoord, ClickModifiers, Spread*, BOOL bSolidDrag);
00941     // Some Render functions to will draw the EORed drag box
00942 //  void RenderMyDragBlobs();
00943     void RenderDragBlobs(Spread* pSpread, DocCoord CentrePosition, BOOL On);
00944     void RenderSelectedObjectBlobs(Spread* pSpread);
00945 
00946     BOOL DoDrag(DocCoord PointerPos, Spread* pSpread);
00947     NodeBlendPath* GetNodeBlendPath();
00948 
00949 protected:
00950     BOOL RecalculateBlend(DocCoord PointerPos); // does the work when the drag has finished
00951 
00952     BOOL GetClosestPointOnPath(DocCoord PointerPos, DocCoord* ClosestPoint);  // retrieves the closest point on the path to the coord passed
00953     NodeBlender* GetBlenderAndPosition(Node* pNode, BOOL* First);  
00954 
00955     // two versions of this function depending on whether you wish to keep 
00956     // the number of blend steps constant or the distance between steps.
00957     BOOL InsertChangeEndActions(double NewPathProportion, DocCoord NewPosition, 
00958                                 Node* pNodeToEdit);
00959 
00960     BOOL InsertChangeEndActions(double NewPathProportion, DocCoord NewPosition,
00961                                  double StepDistance, Node* pNodeToEdit);
00962 
00963     BOOL CalculateNewNumStepsAndPosition(UINT32 OldNumSteps, double BlendDistance, 
00964                                         double StepDistance, double* FixedDistance, 
00965                                         double* MoveableDistance, UINT32* NewNumSteps); 
00966                                         
00967     BOOL InsertChangeProportion(double NewProp, BOOL FirstNode, NodeBlender* pEditBlender);
00968 
00969 
00970     Matrix* m_pTransMatrix;         
00971     DocCoord m_StartCoord;
00972     DocCoord m_LastCoord;
00973     Range*  m_pRange;
00974     Range*  m_pCopyRange;
00975     NodeBlend* m_pNodeBlend;
00976     SelectionState* m_pSelState;
00977     NodeBlendPath* m_pNodeBlendPath;
00978     BlendTool* m_pBlendTool;
00979 };
00980 
00981 
00982 /********************************************************************************************
00983 
00984 >   class ChangeBlendOpParam : public OpParam
00985 
00986     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00987     Created:    17/3/95
00988     Purpose:    The param passed to OpChangeBlend::DoWithParam
00989     SeeAlso:    -
00990 
00991 ********************************************************************************************/
00992 
00993 class ChangeBlendOpParam : public OpParam
00994 {
00995 
00996 CC_DECLARE_MEMDUMP(ChangeBlendOpParam)
00997 
00998 public:
00999     ChangeBlendOpParam()    { ChangeType = CHANGEBLEND_NONE; }
01000     ~ChangeBlendOpParam()   {}
01001 
01002     void SetOldValues(NodeRenderableInk* pNodeBlend);
01003     void SetNewValues(NodeRenderableInk* pNodeBlend);
01004     void SwapOldAndNew();
01005     void SwapProfiles(CProfileBiasGain* pOldProfile, CProfileBiasGain* pNewProfile);
01006 
01007     ChangeBlendType ChangeType;
01008 
01009     BOOL            NewAntiAlias;
01010     BOOL            OldAntiAlias;
01011 
01012     BOOL            NewOneToOne;
01013     BOOL            OldOneToOne;
01014 
01015     ColourBlendType NewColBlendType;
01016     ColourBlendType OldColBlendType;
01017 
01018     BOOL            NewTangential;
01019     BOOL            OldTangential;
01020 
01021     // Diccon Yamanaka 9/99 added code
01022     BOOL            OldBlendedOnCurve;
01023     BOOL            NewBlendedOnCurve;
01024 
01025     CProfileBiasGain OldObjectProfile;
01026     CProfileBiasGain NewObjectProfile;
01027 
01028     CProfileBiasGain OldAttrProfile;
01029     CProfileBiasGain NewAttrProfile;
01030 
01031     EndObject       OldEndObject;
01032     EndObject       NewEndObject;
01033 };
01034 
01035 
01036 /********************************************************************************************
01037 
01038 >   class ChangeBlendAction : public Action
01039 
01040     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
01041     Created:    21/11/94
01042     Purpose:    An action which changes the one-to-one flag of a blend
01043     SeeAlso:    -
01044 
01045 ********************************************************************************************/
01046 
01047 class ChangeBlendAction : public Action
01048 {
01049 
01050 CC_DECLARE_DYNCREATE(ChangeBlendAction)
01051 
01052 public:
01053     ChangeBlendAction();
01054     ~ChangeBlendAction();
01055     virtual ActionCode Execute();
01056     static ActionCode Init( Operation* pOp,
01057                             ActionList* pActionList,
01058                             NodeRenderableInk* pThisNodeBlend,
01059                             ChangeBlendOpParam* pChangeParam,
01060                             ChangeBlendAction** NewAction);
01061 
01062     static void ChangeObjectProfileWithNoUndo (CProfileBiasGain &Profile, BOOL regenerateParents = FALSE);
01063     static void ChangeAttributeProfileWithNoUndo (CProfileBiasGain &Profile);
01064 protected:  
01065     NodeRenderableInk*  pNodeBlend;
01066     ChangeBlendOpParam  ChangeParam;
01067 };
01068 
01069 //--------------------------------------------------------------
01070 //--------------------------------------------------------------
01071 //--------------------------------------------------------------
01072 
01073 enum ChangeBlenderType { CHANGEBLENDER_NONE, 
01074                          CHANGEBLENDER_ANGLESTART, 
01075                          CHANGEBLENDER_ANGLEEND,
01076                          CHANGEBLENDER_PATHSTART,
01077                          CHANGEBLENDER_PATHEND, 
01078                          CHANGEBLENDER_REGEN,
01079                          CHANGEBLENDER_NBPINDEX,
01080                          CHANGEBLENDER_BLENDONCURVE,
01081                          CHANGEBLENDER_SWAPENDS
01082                                                 };
01083 
01084 /********************************************************************************************
01085 
01086 >   class ChangeBlenderOpParam : public OpParam
01087 
01088     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
01089     Created:    20/3/99
01090     Purpose:    Holds the info needed to change the blender in a certain way
01091     SeeAlso:    -
01092 
01093 ********************************************************************************************/
01094 
01095 class ChangeBlenderOpParam : public OpParam
01096 {
01097 
01098 CC_DECLARE_MEMDUMP(ChangeBlenderOpParam)
01099 
01100 public:
01101     ChangeBlenderOpParam()                          { m_ChangeType = CHANGEBLENDER_NONE; }
01102     ChangeBlenderOpParam(ChangeBlenderType Type)    { m_ChangeType = Type; }
01103     ~ChangeBlenderOpParam() {}
01104 
01105     void SetOldValues(NodeBlender* pNodeBlender);
01106     void SetNewValues(NodeBlender* pNodeBlender);
01107     void SwapOldAndNew();
01108 
01109     ChangeBlenderType m_ChangeType;
01110 
01111     double  m_NewAngleStart;
01112     double  m_OldAngleStart;
01113     double  m_NewAngleEnd;
01114     double  m_OldAngleEnd;
01115     double  m_OldPathStart;
01116     double  m_NewPathStart;
01117     double  m_OldPathEnd;
01118     double  m_NewPathEnd;
01119     INT32   m_OldNodeBlendPathIndex;
01120     INT32   m_NewNodeBlendPathIndex;
01121     BOOL    m_OldBlendedOnCurve;
01122     BOOL    m_NewBlendedOnCurve;
01123     INT32   m_OldObjIndexStart;
01124     INT32    m_NewObjIndexStart;
01125     INT32   m_OldObjIndexEnd;
01126     INT32   m_NewObjIndexEnd;
01127 };
01128 
01129 
01130 /********************************************************************************************
01131 
01132 >   class ChangeBlenderAction : public Action
01133 
01134     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
01135     Created:    20/3/99
01136     Purpose:    An action which changes the blender
01137     SeeAlso:    -
01138 
01139 ********************************************************************************************/
01140 
01141 class ChangeBlenderAction : public Action
01142 {
01143 
01144 CC_DECLARE_DYNCREATE(ChangeBlenderAction)
01145 
01146 public:
01147     ChangeBlenderAction();
01148     ~ChangeBlenderAction();
01149     virtual ActionCode Execute();
01150     static ActionCode Init( Operation* pOp,
01151                             ActionList* pActionList,
01152                             NodeBlender* pNodeBlender,
01153                             ChangeBlenderOpParam& ChangeParam);
01154 protected:  
01155     NodeBlender*            m_pNodeBlender;
01156     ChangeBlenderOpParam    m_ChangeParam;
01157 };
01158 
01159 
01160 /********************************************************************************************
01161 
01162 >   class InvalidateBoundsAction : public Action
01163 
01164     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
01165     Created:    20/3/99
01166     Purpose:    An action which invalidates the bounds of a node
01167     SeeAlso:    -
01168 
01169 ********************************************************************************************/
01170 
01171 class InvalidateBoundsAction : public Action
01172 {
01173 
01174 CC_DECLARE_DYNCREATE(InvalidateBoundsAction)
01175 
01176 public:
01177     InvalidateBoundsAction();
01178     ~InvalidateBoundsAction();
01179     virtual ActionCode Execute();
01180     static ActionCode Init( Operation* pOp,
01181                             ActionList* pActionList,
01182                             NodeRenderableBounded* pNode,
01183                             BOOL IncludeChildren);
01184 protected:  
01185     NodeRenderableBounded*  m_pNode;
01186     BOOL                    m_IncludeChildren;
01187 };
01188 
01189 
01190 
01191 /********************************************************************************************
01192 
01193 >   class OpChangeBlendDistance : public SelOperation
01194 
01195     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
01196     Created:    7/9/99
01197     Purpose:    This changes the distance between steps of the selected blends
01198                 
01199 
01200 ********************************************************************************************/
01201 
01202 class OpChangeBlendDistance : public SelOperation
01203 {
01204 
01205 CC_DECLARE_DYNCREATE(OpChangeBlendDistance)
01206 
01207 public:
01208     OpChangeBlendDistance() {}
01209     ~OpChangeBlendDistance() {}
01210 
01211     // These functions required for the OpDescriptor class
01212     static BOOL Declare();
01213     static OpState GetState(String_256* Description, OpDescriptor*);
01214 
01215     // The all-important Do() func
01216     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
01217     virtual void GetOpName(String_256* OpName);
01218 
01219     
01220 
01221 protected:
01222     BOOL InsertChangeStepsAction(NodeBlend* pNodeBlend,  
01223                                  double StepDistance, 
01224                                  UINT32* NewNumSteps, double* NewDistances);
01225 
01226     BOOL InsertChangePathProportion (NodeBlend* pNodeBlend,  
01227                                      double StartDistance,
01228                                      double EndDistance);
01229 
01230     BOOL InsertChangeLinearBlendActions(NodeBlend* pNodeBlend, 
01231                                         Operation* pOp,
01232                                         double NewStepDistance);
01233 
01234     BOOL CalculateNewNumStepsAndPosition(UINT32 OldNumSteps, double BlendDistance, 
01235                                         double StepDistance, double* FixedDistance, 
01236                                         double* MoveableDistance, UINT32* NewNumSteps); 
01237                                         
01238 
01239     BOOL InsertTransformNodesAction(NodeBlend* pNodeBlend, double StartDistance, double EndDistance);
01240     
01241 };
01242 
01243 
01244 
01245 
01246 #endif      // INC_BLENDTOOL

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