opcntr.h

Go to the documentation of this file.
00001 // $Id: opcntr.h 1282 2006-06-09 09:46:49Z 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 Contour operations
00099 
00100 #ifndef INC_OPCONTOUR
00101 #define INC_OPCONTOUR
00102 
00103 #define OPTOKEN_CREATECONTOUR   _T("CreateContour")
00104 #define OPTOKEN_REMOVECONTOUR   _T("RemoveContour")
00105 #define OPTOKEN_CHANGECONTOURWIDTH _T("ChangeContourWidth")
00106 #define OPTOKEN_CHANGECONTOUR_INNER _T("ChangeContourToInner")
00107 #define OPTOKEN_CHANGECONTOUR_OUTER _T("ChangeContourToOuter")
00108 #define OPTOKEN_CHANGECONTOURSTEPS  _T("ChangeContourSteps")
00109 #define OPTOKEN_CHANGECONTOURCOLOURTYPE _T("ChangeContourColourType")
00110 #define OPTOKEN_CHANGECONTOURATTRPROFILE    _T("ChangeContourAttributeProfile")
00111 #define OPTOKEN_CHANGECONTOUROBJPROFILE     _T("ChangeContourObjectProfile")
00112 #define OPTOKEN_CHANGECONTOURSTEPDISTANCE   _T("ChangeContourStepDistance")
00113 #define OPTOKEN_CONVERTPATHTOSHAPES     _T("ConvertPathToShapes")
00114 #define OPTOKEN_TOGGLEINSETPATH _T("InsetPath")
00115 
00116 class NodeContourController;
00117 class NodeGroup;
00118 class AttrStrokeType;
00119 class AttrBrushType;
00120 
00121 #include "blendatt.h"
00122 //#include "biasgain.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00123 //#include "selop.h"
00124 //#include "becomea.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00125 
00126 /********************************************************************************************
00127 >   class CreateContourParam : public OpParam
00128 
00129     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00130     Created:    12/8/99
00131     Purpose:    The op param for the creation of contours
00132 ********************************************************************************************/
00133 class CreateContourParam : public OpParam
00134 {
00135 CC_DECLARE_DYNCREATE(CreateContourParam)
00136 public:
00137     CreateContourParam(List * pList = NULL,
00138                         UINT32 Steps    = 5,
00139                         INT32 Width  = -5000,
00140                         BOOL bInset = FALSE)
00141     {
00142         m_pNodeList = pList;
00143         m_Steps = Steps;
00144         m_Width = Width;
00145         m_bInsetPath = bInset;
00146     }
00147     
00148     // the node list to create the contour on
00149     List * m_pNodeList;
00150 
00151     // the number of steps involved
00152     UINT32 m_Steps;
00153 
00154     // the width of the contour in document coordinates
00155     INT32 m_Width;
00156 
00157     BOOL m_bInsetPath;
00158 } ;
00159 
00160 
00161 /********************************************************************************************
00162 >   class OpCreateContour : public SelOperation
00163 
00164     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00165     Created:    12/8/99
00166     Purpose:    Creates contours on the selection
00167 ********************************************************************************************/
00168 
00169 class OpCreateContour : public SelOperation
00170 {
00171 
00172 CC_DECLARE_DYNCREATE(OpCreateContour)
00173 
00174 public:
00175     // Construction/Destruction
00176     OpCreateContour();
00177     ~OpCreateContour();
00178 
00179     virtual void Do(OpDescriptor *pOpDesc);
00180     virtual void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00181 
00182 //  BOOL GenerateBitmapShapes(NodeBevel* pCurrent, SelRange SelectionRng);
00183 
00184     // These functions required for the OpDescriptor class
00185     static BOOL Declare();
00186     static OpState GetState(String_256* Description, OpDescriptor*);
00187     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00188 };
00189 
00190 /********************************************************************************************
00191 >   class OpRemoveContour : public SelOperation
00192 
00193     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00194     Created:    12/8/99
00195     Purpose:    Removes contours on the selection
00196 ********************************************************************************************/
00197 
00198 class OpRemoveContour : public SelOperation
00199 {
00200 
00201 CC_DECLARE_DYNCREATE(OpRemoveContour)
00202 
00203 public:
00204     // Construction/Destruction
00205     OpRemoveContour();
00206     ~OpRemoveContour();
00207 
00208     virtual void Do(OpDescriptor *pOpDesc);
00209     virtual void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00210 
00211 //  BOOL GenerateBitmapShapes(NodeBevel* pCurrent, SelRange SelectionRng);
00212 
00213     // These functions required for the OpDescriptor class
00214     static BOOL Declare();
00215     static OpState GetState(String_256* Description, OpDescriptor*);
00216 
00217     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00218 };
00219 
00220 /********************************************************************************************
00221 >   class RegenerateContourAction : public Action
00222 
00223     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00224     Created:    17/3/99
00225     Purpose:    Forces a regeneration of the bevel in all nodes in the list
00226                 Used by NodeBevelcontroller::OnChildChange to force redraws in undos/redos
00227 ********************************************************************************************/
00228 class RegenerateContourAction : public Action
00229 {
00230 
00231 CC_DECLARE_DYNCREATE(RegenerateContourAction)
00232 
00233 public:
00234     RegenerateContourAction();
00235     ~RegenerateContourAction();
00236     virtual ActionCode Execute();
00237     static ActionCode Init( Operation* pOp,
00238                             ActionList* pActionList,
00239                             List * pNodes,
00240                             RegenerateContourAction** NewAction,
00241                             BOOL bCache = FALSE);
00242 protected:
00243     List * m_pNodes;
00244     BOOL m_bCache;
00245     DocRect m_OldRect;
00246 };
00247 
00248 /********************************************************************************************
00249 >   class OpChangeContourWidth : public UndoableOperation
00250 
00251     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00252     Created:    17/3/99
00253     Purpose:    Forces a regeneration of the bevel in all nodes in the list
00254                 Used by NodeBevelcontroller::OnChildChange to force redraws in undos/redos
00255 ********************************************************************************************/
00256 class OpChangeContourWidth : public UndoableOperation
00257 {
00258 
00259 CC_DECLARE_DYNCREATE(OpChangeContourWidth)
00260 
00261 public:
00262     // Construction/Destruction
00263     OpChangeContourWidth();
00264     ~OpChangeContourWidth();
00265 
00266     virtual void Do(OpDescriptor *pOpDesc);
00267     virtual void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00268 
00269     // These functions required for the OpDescriptor class
00270     static BOOL Declare();
00271     static OpState GetState(String_256* Description, OpDescriptor*);
00272 
00273     void GetOpName(String_256 *pOpName);
00274 
00275     // Karim 21/01/2000 - see UndoableOperation base implementation.
00276     virtual BOOL MayChangeNodeBounds() const { return TRUE; }
00277 } ;
00278 
00279 
00280 /********************************************************************************************
00281 >   class ChangeContourWidthParam : public OpParam
00282 
00283     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00284     Created:    17/3/99
00285     Purpose:    Parameter for the change countour operation
00286 ********************************************************************************************/
00287 class ChangeContourWidthParam : public OpParam
00288 {
00289 public:
00290     // parameters -
00291     // pNodes   -   The list of nodes to invoke this op on
00292     // NewWidth -   The new width to set
00293     // bKeepWidth - Whether to keep the direction (either inner or outer) of the
00294     //              contour when setting the width, or whether to just take the new width
00295     //              and use this
00296     ChangeContourWidthParam(List * pNodes, MILLIPOINT NewWidth, BOOL bKeepDirection)
00297     {   
00298         m_pNodes = pNodes;
00299         m_Width = NewWidth;
00300         m_bKeepDirection = bKeepDirection;
00301     }
00302 
00303     List * m_pNodes;
00304     MILLIPOINT m_Width;
00305     BOOL m_bKeepDirection;
00306 } ;
00307 
00308 /********************************************************************************************
00309 >   class ContourWidthListItem : public ListItem
00310 
00311     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00312     Created:    17/3/99
00313     Purpose:    ListItem for use in ChangeContourWidthAction's list
00314 ********************************************************************************************/
00315 class ContourWidthListItem : public ListItem
00316 {
00317 public:
00318     ContourWidthListItem(MILLIPOINT Width) { m_Width = Width; }
00319 
00320     MILLIPOINT m_Width;
00321 } ;
00322 
00323 /********************************************************************************************
00324 >   class ChangeContourWidthAction : public Action
00325 
00326     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00327     Created:    17/3/99
00328     Purpose:    Forces a regeneration of the bevel in all nodes in the list
00329                 Used by NodeBevelcontroller::OnChildChange to force redraws in undos/redos
00330 ********************************************************************************************/
00331 class ChangeContourWidthAction : public Action
00332 {
00333 
00334 CC_DECLARE_DYNCREATE(ChangeContourWidthAction)
00335 
00336 public:
00337     ChangeContourWidthAction();
00338     ~ChangeContourWidthAction();
00339     virtual ActionCode Execute();
00340     static ActionCode Init( Operation* pOp,
00341                             ActionList* pActionList,
00342                             List * pNodes,
00343                             MILLIPOINT NewWidth,
00344                             BOOL bKeepDirection,
00345                             ChangeContourWidthAction** NewAction);
00346 protected:
00347     List m_Nodes;
00348     List m_WidthList;   
00349 };
00350 
00351 /********************************************************************************************
00352 >   class ChangeContourToOuterAction : public Action
00353 
00354     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00355     Created:    6/9/99
00356     Purpose:    Changes the node to an outer contour node & regenerates
00357 ********************************************************************************************/
00358 class ChangeContourToOuterAction : public Action
00359 {
00360 
00361 CC_DECLARE_DYNCREATE(ChangeContourToOuterAction)
00362 
00363 public:
00364     ChangeContourToOuterAction();
00365     ~ChangeContourToOuterAction();
00366     virtual ActionCode Execute();
00367     static ActionCode Init( Operation* pOp,
00368                             ActionList* pActionList,
00369                             NodeContourController * pContour,
00370                             ChangeContourToOuterAction** NewAction);
00371 protected:
00372     NodeContourController * m_pContour;
00373     MILLIPOINT m_LastWidth;
00374 };
00375 
00376 /********************************************************************************************
00377 >   class ChangeContourToInnerAction : public Action
00378 
00379     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00380     Created:    6/9/99
00381     Purpose:    Changes the node to an inner contour node & regenerates
00382 ********************************************************************************************/
00383 class ChangeContourToInnerAction : public Action
00384 {
00385 
00386 CC_DECLARE_DYNCREATE(ChangeContourToInnerAction)
00387 
00388 public:
00389     ChangeContourToInnerAction();
00390     ~ChangeContourToInnerAction();
00391     virtual ActionCode Execute();
00392     static ActionCode Init( Operation* pOp,
00393                             ActionList* pActionList,
00394                             NodeContourController * pContour,
00395                             ChangeContourToInnerAction** NewAction);
00396 protected:
00397     NodeContourController * m_pContour;
00398     MILLIPOINT m_LastWidth;
00399 };
00400 
00401 /********************************************************************************************
00402 >   class OpChangeContourToInner : public SelOperation
00403 
00404     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00405     Created:    17/3/99
00406     Purpose:    Changes all contours to inner - used by the button on the infobar
00407 ********************************************************************************************/
00408 
00409 class OpChangeContourToInner : public SelOperation
00410 {
00411 
00412 CC_DECLARE_DYNCREATE(OpChangeContourToInner)
00413 
00414 public:
00415     // Construction/Destruction
00416     OpChangeContourToInner();
00417     ~OpChangeContourToInner();
00418 
00419     virtual void Do(OpDescriptor *pOpDesc);
00420     virtual void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00421 
00422     // These functions required for the OpDescriptor class
00423     static BOOL Declare();
00424     static OpState GetState(String_256* Description, OpDescriptor*);
00425 };
00426 
00427 
00428 /********************************************************************************************
00429 >   class OpChangeContourToOuter : public SelOperation
00430 
00431     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00432     Created:    17/3/99
00433     Purpose:    Changes all contours to outer - used by the button on the infobar
00434 ********************************************************************************************/
00435 
00436 class OpChangeContourToOuter : public SelOperation
00437 {
00438 
00439 CC_DECLARE_DYNCREATE(OpChangeContourToOuter)
00440 
00441 public:
00442     // Construction/Destruction
00443     OpChangeContourToOuter();
00444     ~OpChangeContourToOuter();
00445 
00446     virtual void Do(OpDescriptor *pOpDesc);
00447     virtual void DoWithParam(OpDescriptor* pOp, OpParam* pParam);
00448 
00449     // These functions required for the OpDescriptor class
00450     static BOOL Declare();
00451     static OpState GetState(String_256* Description, OpDescriptor*);
00452 };
00453 
00454 
00455 /********************************************************************************************
00456 
00457 >   class OpChangeContourSteps : public SelOperation
00458 
00459     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00460     Created:    4/11/94
00461     Purpose:    This changes the number of steps of the selected blends
00462 
00463 ********************************************************************************************/
00464 
00465 
00466 class OpChangeContourSteps : public SelOperation
00467 {
00468 CC_DECLARE_DYNCREATE(OpChangeContourSteps);
00469 
00470 public:
00471     // Construction/Destruction
00472     OpChangeContourSteps()  {}
00473     ~OpChangeContourSteps() {}
00474 
00475     // These functions required for the OpDescriptor class
00476     static BOOL Declare();
00477     static OpState GetState(String_256* Description, OpDescriptor*);
00478 
00479     // The all-important Do() func
00480     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00481     virtual void GetOpName(String_256* OpName);
00482 
00483     // Karim 21/01/2000 - see UndoableOperation base implementation.
00484     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00485 };
00486 
00487 
00488 /********************************************************************************************
00489 
00490 >   class ChangeContourStepsAction : public Action
00491 
00492     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00493     Created:    4/11/94
00494     Purpose:    An action which undoes the modification of a path's filled bit (or redoes it)
00495                 It can also be used to undo the IsStroked flag as well.
00496     SeeAlso:    -
00497 
00498 ********************************************************************************************/
00499 
00500 class ChangeContourStepsAction : public Action
00501 {
00502 
00503 CC_DECLARE_DYNCREATE(ChangeContourStepsAction)
00504 
00505 public:
00506     ChangeContourStepsAction();
00507     ~ChangeContourStepsAction();
00508     virtual ActionCode Execute();
00509     static ActionCode Init( Operation* pOp,
00510                             ActionList* pActionList,
00511                             Node* pThisNodeBlend,
00512                             UINT32 NumSteps,
00513                             double DistanceEntered,
00514                             ChangeContourStepsAction** NewAction);
00515 protected:
00516     Node*       pNodeBlend;
00517     UINT32      OldNumSteps;
00518     double      OldDistanceEntered;
00519 };
00520 
00521 /********************************************************************************************
00522 
00523 >   class OpChangeContourColourType : public SelOperation
00524 
00525     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00526     Created:    4/11/94
00527     Purpose:    This changes the number of steps of the selected blends
00528 
00529 ********************************************************************************************/
00530 
00531 
00532 class OpChangeContourColourType : public SelOperation
00533 {
00534 CC_DECLARE_DYNCREATE(OpChangeContourColourType);
00535 
00536 public:
00537     // Construction/Destruction
00538     OpChangeContourColourType()  {}
00539     ~OpChangeContourColourType() {}
00540 
00541     // These functions required for the OpDescriptor class
00542     static BOOL Declare();
00543     static OpState GetState(String_256* Description, OpDescriptor*);
00544 
00545     // The all-important Do() func
00546     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00547     virtual void GetOpName(String_256* OpName);
00548 
00549     // Karim 21/01/2000 - see UndoableOperation base implementation.
00550     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00551 };
00552 
00553 /********************************************************************************************
00554 
00555 >   class OpChangeContourAttributeProfile : public SelOperation
00556 
00557     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00558     Created:    4/11/94
00559     Purpose:    This changes the number of steps of the selected blends
00560 
00561 ********************************************************************************************/
00562 
00563 
00564 class OpChangeContourAttributeProfile : public SelOperation
00565 {
00566 CC_DECLARE_DYNCREATE(OpChangeContourAttributeProfile);
00567 
00568 public:
00569     // Construction/Destruction
00570     OpChangeContourAttributeProfile()  {}
00571     ~OpChangeContourAttributeProfile() {}
00572 
00573     // These functions required for the OpDescriptor class
00574     static BOOL Declare();
00575     static OpState GetState(String_256* Description, OpDescriptor*);
00576 
00577     // The all-important Do() func
00578     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00579     virtual void GetOpName(String_256* OpName);
00580 
00581     // Karim 21/01/2000 - see UndoableOperation base implementation.
00582     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00583 };
00584 
00585 /********************************************************************************************
00586 
00587 >   class ChangeContourAttributeProfile : public Action
00588 
00589     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00590     Created:    4/11/94
00591     Purpose:    An action which undoes the modification of a path's filled bit (or redoes it)
00592                 It can also be used to undo the IsStroked flag as well.
00593     SeeAlso:    -
00594 
00595 ********************************************************************************************/
00596 
00597 class ChangeContourAttributeProfileAction : public Action
00598 {
00599 
00600 CC_DECLARE_DYNCREATE(ChangeContourAttributeProfileAction)
00601 
00602 public:
00603     ChangeContourAttributeProfileAction();
00604     ~ChangeContourAttributeProfileAction();
00605     virtual ActionCode Execute();
00606     static ActionCode Init( Operation* pOp,
00607                             ActionList* pActionList,
00608                             NodeContourController* pThisNodeContour,
00609                             CProfileBiasGain Profile,
00610                             ChangeContourAttributeProfileAction** NewAction);
00611 
00612     static void ChangeAttributeProfileWithNoUndo (CProfileBiasGain &Profile);
00613 protected:
00614     NodeContourController*      m_pNode;
00615     CProfileBiasGain m_Profile;
00616 };
00617 
00618 
00619 
00620 
00621 
00622 /********************************************************************************************
00623 
00624 >   class ChangeContourColourTypeAction : public Action
00625 
00626     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00627     Created:    4/11/94
00628     Purpose:    An action which undoes the modification of a path's filled bit (or redoes it)
00629                 It can also be used to undo the IsStroked flag as well.
00630     SeeAlso:    -
00631 
00632 ********************************************************************************************/
00633 
00634 class ChangeContourColourTypeAction : public Action
00635 {
00636 
00637 CC_DECLARE_DYNCREATE(ChangeContourColourTypeAction)
00638 
00639 public:
00640     ChangeContourColourTypeAction();
00641     ~ChangeContourColourTypeAction();
00642     virtual ActionCode Execute();
00643     static ActionCode Init( Operation* pOp,
00644                             ActionList* pActionList,
00645                             NodeContourController* pThisNodeContour,
00646                             ColourBlendType type,
00647                             ChangeContourColourTypeAction** NewAction);
00648 protected:
00649     NodeContourController*      m_pNode;
00650     ColourBlendType m_OldType;
00651 };
00652 
00653 /********************************************************************************************
00654 >   class CreateContourParam : public OpParam
00655 
00656     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00657     Created:    12/8/99
00658     Purpose:    The op param for the creation of contours
00659 ********************************************************************************************/
00660 class ChangeContourProfileParam : public OpParam
00661 {
00662 
00663 public:
00664     ChangeContourProfileParam(CProfileBiasGain &Profile)
00665     {
00666         m_Profile = Profile;
00667     }
00668     
00669     CProfileBiasGain m_Profile;
00670 } ;
00671 
00672 /********************************************************************************************
00673 
00674 >   class OpChangeContourObjectProfile : public SelOperation
00675 
00676     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00677     Created:    4/11/94
00678     Purpose:    This changes the number of steps of the selected blends
00679 
00680 ********************************************************************************************/
00681 
00682 class OpChangeContourObjectProfile : public SelOperation
00683 {
00684 CC_DECLARE_DYNCREATE(OpChangeContourObjectProfile);
00685 
00686 public:
00687     // Construction/Destruction
00688     OpChangeContourObjectProfile()  {}
00689     ~OpChangeContourObjectProfile() {}
00690 
00691     // These functions required for the OpDescriptor class
00692     static BOOL Declare();
00693     static OpState GetState(String_256* Description, OpDescriptor*);
00694 
00695     // The all-important Do() func
00696     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00697     virtual void GetOpName(String_256* OpName);
00698 
00699     // Karim 21/01/2000 - see UndoableOperation base implementation.
00700     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00701 };
00702 
00703 
00704 /********************************************************************************************
00705 
00706 >   class ChangeContourObjectProfile : public Action
00707 
00708     Author:     Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
00709     Created:    4/11/94
00710     Purpose:    An action which undoes the modification of a path's filled bit (or redoes it)
00711                 It can also be used to undo the IsStroked flag as well.
00712     SeeAlso:    -
00713 
00714 ********************************************************************************************/
00715 
00716 class ChangeContourObjectProfileAction : public Action
00717 {
00718 
00719 CC_DECLARE_DYNCREATE(ChangeContourObjectProfileAction)
00720 
00721 public:
00722     ChangeContourObjectProfileAction();
00723     ~ChangeContourObjectProfileAction();
00724     virtual ActionCode Execute();
00725     static ActionCode Init( Operation* pOp,
00726                             ActionList* pActionList,
00727                             NodeContourController* pThisNodeContour,
00728                             CProfileBiasGain Profile,
00729                             ChangeContourObjectProfileAction** NewAction);
00730 
00731     static void ChangeObjectProfileWithNoUndo (CProfileBiasGain &Profile);
00732 protected:
00733     NodeContourController*      m_pNode;
00734     CProfileBiasGain m_Profile;
00735 };
00736 
00737 /********************************************************************************************
00738 
00739 >   class OpChangeContourStepDistance : public SelOperation
00740 
00741     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00742     Created:    4/11/94
00743     Purpose:    This changes the step distance of the selected blends
00744 
00745 ********************************************************************************************/
00746 
00747 class OpChangeContourStepDistance : public SelOperation
00748 {
00749 CC_DECLARE_DYNCREATE(OpChangeContourStepDistance);
00750 
00751 public:
00752     // Construction/Destruction
00753     OpChangeContourStepDistance()  {}
00754     ~OpChangeContourStepDistance() {}
00755 
00756     // These functions required for the OpDescriptor class
00757     static BOOL Declare();
00758     static OpState GetState(String_256* Description, OpDescriptor*);
00759 
00760     // The all-important Do() func
00761     virtual void DoWithParam(OpDescriptor*,OpParam* pOpParam);
00762     virtual void GetOpName(String_256* OpName);
00763 
00764     // Karim 21/01/2000 - see UndoableOperation base implementation.
00765     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00766 };
00767 
00768 /********************************************************************************************
00769 
00770 >   class OpConvertPathToShapes : public SelOperation
00771 
00772     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00773     Created:    10/2/2000
00774     Purpose:    This creates objects out of the paths of the selected objects
00775 
00776 ********************************************************************************************/
00777 
00778 class OpConvertPathToShapes : public SelOperation
00779 {
00780 CC_DECLARE_DYNCREATE(OpConvertPathToShapes);
00781 
00782 public:
00783     // Construction/Destruction
00784     OpConvertPathToShapes()  {}
00785     ~OpConvertPathToShapes() {}
00786 
00787     // These functions required for the OpDescriptor class
00788     static BOOL Declare();
00789     static OpState GetState(String_256* Description, OpDescriptor*);
00790 
00791     // The all-important Do() func
00792     virtual void Do(OpDescriptor*);
00793     virtual void GetOpName(String_256* OpName); 
00794 
00795     // Karim 21/01/2000 - see UndoableOperation base implementation.
00796     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00797 
00798 
00799     static BOOL ConvertPathToShapes(OpConvertPathToShapes* pOp, NodeRenderableInk* pInk);
00800     
00801     // when we convert a stroked shape we want to swap the stroke colour to become the 
00802     // new fill colour
00803     static BOOL AdjustStrokeAndFillAttrs(OpConvertPathToShapes* pOp, 
00804                                             NodePath* pNewNode, 
00805                                             NodeRenderableInk* pCreatedByNode = NULL,
00806                                             CCAttrMap* pAttrMap = NULL);
00807 
00808 protected: // functions to convert objects with brush and stroke attributes
00809 
00810     // Converts an ink node with a brush attribute applied
00811     static BOOL ConvertBrush(OpConvertPathToShapes* pOp, AttrBrushType* pAttrBrush, NodeRenderableInk* pInk);
00812 
00813     // Converts an ink node with a stroke attribute applied
00814     static BOOL ConvertStroke(OpConvertPathToShapes* pOp, AttrStrokeType* pStroke, NodeRenderableInk* pInk);
00815 
00816 };
00817 
00818 /***********************************************************************************************
00819 
00820 >   class ConvertPathToShapesBecomeA : public BecomeA
00821 
00822     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com> Mc
00823     Created:    10/2/2000
00824     Purpose:    The become A structure for the above operation
00825                 Adds a node into the tree which is the stroked path of the particular node
00826                 passed into the PassBack function
00827     Notes:      When stepping through, you MUST store the next node before calling
00828                 DoBecomeA - since the tree will be changed when PassBack is called in this
00829                 class.
00830 
00831 ***********************************************************************************************/
00832 
00833 class ConvertPathToShapesBecomeA : public BecomeA
00834 {
00835 public:
00836     ConvertPathToShapesBecomeA( BecomeAReason Reason,
00837                     CCRuntimeClass* pClass, 
00838                     UndoableOperation* pOp, 
00839                     BOOL Sel);
00840 
00841     virtual BOOL PassBack(NodeRenderableInk* pNewNode,NodeRenderableInk* pCreatedByNode,CCAttrMap* pAttrMap=NULL);
00842 
00843     void GetSummedPath(Path * pPath) { pPath->CloneFrom(m_SummedPath); }
00844     NodeRenderableInk* GetContextNode();
00845 
00846 private:
00847     Path m_SummedPath;
00848     NodeGroup* m_pContextNode;
00849 };
00850 
00851 /********************************************************************************************
00852 
00853 >   class OpToggleContourInsetPath : public SelOperation
00854 
00855     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00856     Created:    10/2/2000
00857     Purpose:    Toggles the inset path states of all selected contours
00858 
00859 ********************************************************************************************/
00860 
00861 class OpToggleContourInsetPath : public SelOperation
00862 {
00863 CC_DECLARE_DYNCREATE(OpToggleContourInsetPath);
00864 
00865 public:
00866     // Construction/Destruction
00867     OpToggleContourInsetPath()  {}
00868     ~OpToggleContourInsetPath() {}
00869 
00870     // These functions required for the OpDescriptor class
00871     static BOOL Declare();
00872     static OpState GetState(String_256* Description, OpDescriptor*);
00873 
00874     // The all-important Do() func
00875     virtual void DoWithParam(OpDescriptor*, OpParam*);
00876     virtual void GetOpName(String_256* OpName);
00877 
00878     // Karim 21/01/2000 - see UndoableOperation base implementation.
00879     virtual BOOL MayChangeNodeBounds() const { return FALSE; }
00880 private:
00881     UINT32 m_OpName;
00882 };
00883 
00884 /********************************************************************************************
00885 >   class ToggleInsetPathAction : public Action
00886 
00887     Author:     David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
00888     Created:    17/3/99
00889     Purpose:    Toggles the inset path flag on the given node
00890 ********************************************************************************************/
00891 class ToggleInsetPathAction : public Action
00892 {
00893 
00894 CC_DECLARE_DYNCREATE(ToggleInsetPathAction)
00895 
00896 public:
00897     ToggleInsetPathAction();
00898     ~ToggleInsetPathAction();
00899     virtual ActionCode Execute();
00900     static ActionCode Init( Operation* pOp,
00901                             ActionList* pActionList,
00902                             NodeContourController *pNode,
00903                             BOOL bInsetPathFlag, 
00904                             ToggleInsetPathAction** NewAction);
00905 protected:
00906     NodeContourController * m_pNode;
00907     BOOL m_OldSetting;
00908 };
00909 
00910 
00911 
00912 #endif

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