shapeops.h

Go to the documentation of this file.
00001 // $Id: shapeops.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 
00099 /*
00100 */
00101 
00102 
00103 #ifndef INC_SHAPEOPS
00104 #define INC_SHAPEOPS
00105 
00106 //#include "doccoord.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00107 //#include "paths.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 //#include "ops.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00109 //#include "selop.h"                          - in camtypes.h [AUTOMATICALLY REMOVED]
00110 
00111 #define OPTOKEN_EDITREGULARSHAPE    _T("EditRegularShape")
00112 #define OPTOKEN_DRAGREGULARSHAPE    _T("DragRegularShape")
00113 #define OPTOKEN_RESHAPESHAPEEDGE    _T("ReshapeShapeEdge")
00114 #define OPTOKEN_TOGGLEELIPPOLY      _T("ShapeToggleElipPoly")
00115 #define OPTOKEN_TOGGLECURVATURE     _T("ShapeToggleCurvature")
00116 #define OPTOKEN_TOGGLESTELLATION    _T("ShapeToggleStellation")
00117 #define OPTOKEN_QUICKSHAPE_MAKEREGULAR  _T("QuickShapeMakeRegular")
00118 
00119 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES _T("QuickShapeNumberSides")
00120 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES3 _T("QuickShapeNumberSides3")
00121 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES4 _T("QuickShapeNumberSides4")
00122 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES5 _T("QuickShapeNumberSides5")
00123 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES6 _T("QuickShapeNumberSides6")
00124 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES7 _T("QuickShapeNumberSides7")
00125 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES8 _T("QuickShapeNumberSides8")
00126 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES9 _T("QuickShapeNumberSides9")
00127 #define OPTOKEN_QUICKSHAPE_NUMBERSIDES10 _T("QuickShapeNumberSides10")
00128 
00129 class Cursor;
00130 class NodeRegularShape;
00131 
00132 /***********************************************************************************************
00133 
00134 >   class EditRegularShapeParam : public OpParam
00135 
00136     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00137     Created:    08/12/94
00138     Purpose:    The OpParam to use when calling OpEditRegularShape.  Used to pass in the shape(s)
00139                 to edit and what to change them to.
00140                 ChangeShape points to a specific NodeRegularShape to edit or is NULL to indicate
00141                 all slected shapes should be changed
00142                 ShapeData points to a NodeRegularShape whose data members are copied into
00143                 ChangeShape.
00144     SeeAlso:    EditRegularShapeParam::DoWithParam
00145 
00146 ***********************************************************************************************/
00147 class EditRegularShapeParam : public OpParam
00148 {
00149     CC_DECLARE_MEMDUMP(EditRegularShapeParam)   
00150 
00151 public:
00152     enum BooleanChange {CHANGE_DONTCARE, CHANGE_SETFALSE, CHANGE_SETTRUE};
00153     enum AffectShape {AFFECT_ALL, AFFECT_ELLIPSES, AFFECT_RECTANGLES};
00154     
00155     EditRegularShapeParam(NodeRegularShape* ChangeShapes);
00156 
00157     NodeRegularShape* ShapeToChange;
00158     AffectShape ShapesToAffect;
00159     Path*   NewEdgePath1;       // NULL to ignore
00160     Path*   NewEdgePath2;       // NULL to ignore
00161     UINT32  NewNumSides;        // 0 to ignore
00162     BooleanChange   NewCircular;
00163     BooleanChange   NewStellated;
00164     BooleanChange   NewPrimaryCurvature;
00165     BooleanChange   NewStellationCurvature;
00166     double  NewStellRadiusToPrimary;    // -1.0 to ignore
00167     double  NewPrimaryCurveToPrimary;   // -1.0 to ignore
00168     double  NewStellCurveToStell;       // -1.0 to ignore
00169     double  NewStellOffsetRatio;        // -1000 to ignore
00170 
00171     DocCoord    TranslateTo;            // Position to translate the shape to
00172     DocCoord    TranslateBy;            // Offset to translate the shape by 
00173     INT32       SetRadiusLength;        // Ammount to set the shapes major axes length to (scaling the shape)
00174     INT32       AddRadiusLength;        // Ammount to [inc/dec]rement the shapes major axes length by
00175     double      RotateTo;               // Angle to rotate each shape to (PI to -PI 0 along +ve x axis)
00176     double      RotateBy;               // Angle (in radians) to rotate each shape by
00177     INT32       SetStellationLength;    // Ammount to set the shapes stellation radius to
00178     INT32       AddStellationLength;    // Ammount to [inc/dec]rement the shapes stellation radius by
00179     double      SetStellationOffset;    // New value of the stellation offset (-180 to 180)
00180     double      AddStellationOffset;    // Value to increase the stellation offset by (degrees)
00181     double      AddPrimaryCurvature;    // Value to increase the primary curvature by
00182     double      AddStellationCurvature; // Value to increase the stellation curvature by
00183     INT32       SetMajorAxisLength;     // New length of the shapes MajorAxis
00184     INT32       AddMajorAxisLength;     // Ammount to add to the shapes MajorAxis
00185     INT32       SetMinorAxisLength;     // New length of the shapes MinorAxis
00186     INT32       AddMinorAxisLength;     // Ammount to add to the shapes MinorAxis
00187 };
00188 
00189 
00190 
00191 /********************************************************************************************
00192 
00193 >   class OpEditRegularShape : public SelOperation
00194 
00195     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00196     Created:    08/12/94  
00197     Purpose:    This operation can be used to change the internal data members of
00198                 NodeRegularShapes in an undoable way.  It either changes one particular shape
00199                 or all selected shapes.  The data members are changed to those supplied by
00200                 the parameter object.
00201     SeeAlso:    OpEditRegularShape::DoWithParam
00202 
00203 ********************************************************************************************/
00204 
00205 class OpEditRegularShape: public SelOperation
00206 {         
00207     CC_DECLARE_DYNCREATE( OpEditRegularShape )    
00208 
00209 public:
00210     OpEditRegularShape();                               
00211     static BOOL     Init();             
00212     static OpState  GetState(String_256*, OpDescriptor*);       
00213     void            DoWithParam(OpDescriptor* pOpDesc, OpParam* pEntryOpParam); 
00214 
00215 protected:
00216     BOOL CarryOut(NodeRegularShape* ShapeToEdit, EditRegularShapeParam* pOpParam);  
00217     BOOL ShouldDoThisShape(NodeRegularShape* pShape, EditRegularShapeParam::AffectShape Allowance);
00218 };  
00219 
00220 
00221 
00222 /********************************************************************************************
00223 
00224 >   class OpDragRegularShape : public SelOperation
00225 
00226     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00227     Created:    14/12/94
00228     Purpose:    This operation is started by a NodeRegularShape when someone drags on one of
00229                 its control points. As the control point is dragged about the new version of
00230                 the shape, corosponding to the new blob positions, will be EOR rendered to
00231                 the window.
00232 
00233 ********************************************************************************************/
00234 
00235 class OpDragRegularShape : public SelOperation
00236 {
00237 
00238 CC_DECLARE_DYNCREATE(OpDragRegularShape)
00239 
00240     enum DragType {DRAG_CENTRE, DRAG_ELLIPSE, DRAG_PRIMARY, DRAG_STELLATION,
00241                                                 DRAG_PRIMARYCURVE, DRAG_STELLATIONCURVE};
00242 
00243 public:
00244     // Construction/Destruction
00245     OpDragRegularShape();
00246 
00247     // The all important Do functions
00248     void DoStartDragEdit( NodeRegularShape*, DocCoord, Spread *, DragType, BOOL QuickShape);
00249     void DoStartDragEditCurve( NodeRegularShape*, DocCoord, Spread *, DragType, DocCoord Start, DocCoord End);
00250     virtual BOOL SnappingDrag();
00251     
00252     // Virtual functions needed for the dragging operations to work
00253     virtual void DragPointerMove( DocCoord Pos, ClickModifiers Mods, Spread* pSpread, BOOL bSolidDrag);
00254     virtual void DragFinished(  DocCoord Pos, ClickModifiers Mods, Spread* pSpread, BOOL Success, BOOL bSolidDrag);
00255 
00256     // Some Render functions to draw the EORed path
00257     virtual void RenderDragBlobs( DocRect, Spread * , BOOL bSolidDrag);
00258         
00259     // These functions required for the OpDescriptor class
00260     static BOOL Init();
00261     static OpState GetState(String_256* Description, OpDescriptor*);
00262 
00263 private:
00264     // Functions for in-drag processing
00265     BOOL ProcessCentre(DocCoord Pos, ClickModifiers Mods);
00266     BOOL ProcessPrimary(DocCoord Pos, ClickModifiers Mods);
00267     BOOL ProcessRectangle(DocCoord Pos, ClickModifiers Mods);
00268     BOOL ProcessRectangleDiagonal(DocCoord Pos, ClickModifiers Mods);
00269     BOOL ProcessRectangleEdge(DocCoord Pos, DocCoord OtherEnd);
00270     BOOL ProcessEllipse(DocCoord Pos, ClickModifiers Mods);
00271     BOOL ProcessStellation(DocCoord Pos, ClickModifiers Mods);
00272     BOOL ProcessRadius(DocCoord Pos, ClickModifiers Mods);
00273     BOOL ProcessPrimaryCurve(DocCoord Pos);
00274     BOOL ProcessStellationCurve(DocCoord Pos);
00275     void WheelConstrain(DocCoord* PointerPos, const DocCoord StartPos);
00276     DocCoord GetUTPosition(DocCoord TransedPos);
00277     BOOL IsJoinAcute(const DocCoord* pJoin, const DocCoord* pOtherEndOfJoin, const DocCoord* pOtherPoint);
00278 
00279     // Data members
00280     DocCoord    LastMousePos;               // The position of the mouse at the last mouse move message
00281     DocCoord    StartMousePos;              // Mouse position of initial click
00282     Spread*     StartSpread;                // The spread that the drag started on
00283     NodeRegularShape*   OriginalShape;      // The original shape 
00284     NodeRegularShape*   EditShape;          // and a copy of it that we can change
00285     Cursor* pCursor;                        // Cursor to display during dragging
00286     INT32 CurrentCursorID;
00287     DragType DragObject;                    // Type of drag
00288 
00289     DocCoord LineStart;
00290     DocCoord LineEnd;
00291     Matrix transMat;                        // the current tranform from Original to edit
00292     DocCoord RectangleArray[4];             // Used in rectangle dragging
00293     BOOL DragAroundCentre;
00294 };
00295 
00296 
00297 
00298 /********************************************************************************************
00299 
00300 >   class OpReformShapeEdge : public SelOperation
00301 
00302     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00303     Created:    16/12/94
00304     Purpose:    This operation is started by a NodeRegularShape when someone drags on one of
00305                 its edges.  It is used to interactively reform the path used to form the edge
00306                 of the shape
00307 
00308 ********************************************************************************************/
00309 
00310 class OpReformShapeEdge : public SelOperation
00311 {
00312 
00313 CC_DECLARE_DYNCREATE(OpReformShapeEdge)
00314 
00315 
00316 public:
00317     // Construction/Destruction
00318     OpReformShapeEdge();
00319 
00320     // The all important Do functions
00321     void DoStartDragEdit(NodeRegularShape* OrigShape, BOOL EdgeOne, DocCoord Anchor,
00322                                                 Spread *pSpread, INT32 SegmentIndex);
00323 
00324     // Virtual functions needed for the dragging operations to work
00325     virtual void DragPointerMove( DocCoord Pos, ClickModifiers Mods, Spread* pSpread, BOOL bSolidDrag);
00326     virtual void DragFinished(  DocCoord Pos, ClickModifiers Mods, Spread* pSpread, BOOL Success, BOOL bSolidDrag);
00327 
00328     // Some Render functions to draw the EORed path
00329     virtual void RenderDragBlobs( DocRect, Spread * , BOOL bSolidDrag);
00330         
00331     // These functions required for the OpDescriptor class
00332     static BOOL Init();
00333     static OpState GetState(String_256* Description, OpDescriptor*);
00334 
00335 private:
00336     enum DragType {DRAG_EDGE1, DRAG_EDGE2};
00337     void RecalculateEdge( DocCoord Offset);
00338     BOOL BuildEditEdge();
00339     BOOL BuildEditShape(BOOL CopyToBoth, BOOL ShouldMirror);
00340     BOOL ReversePath(Path* NewPath, BOOL ShouldMirror);
00341 
00342     NodeRegularShape* EditShape;
00343     NodeRegularShape* OriginalShape;
00344     DocCoord StartMousePos;
00345     DocCoord UTStartMousePos;
00346     DocCoord OrigControl1;
00347     DocCoord OrigControl2;
00348     Spread* StartSpread;
00349     Path* EditEdge;
00350     INT32 Index;
00351     double paramdist;
00352     DragType EdgeDrag;
00353 
00354 };
00355 
00356 
00357 
00358 /********************************************************************************************
00359 
00360 >   class ChangeShapeDataAction : public Action
00361 
00362     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00363     Created:    09/12/94
00364     Purpose:    An action to toggle a (Boolean or double) value of a regular shape.
00365     SeeAlso:    ChangeShapePointAction
00366 
00367 ********************************************************************************************/
00368 
00369 class ChangeShapeDataAction : public Action
00370 {
00371 
00372 CC_DECLARE_DYNCREATE(ChangeShapeDataAction)
00373 
00374 public:
00375 
00376     enum ChangeItem {CHANGE_NUMSIDES, CHANGE_CIRCULAR, CHANGE_STELLATED, CHANGE_PRIMARYCURVATURE,
00377                      CHANGE_STELLATIONCURVATURE, CHANGE_STELLRADIUSTOPRIMARY,
00378                      CHANGE_PRIMARYCURVETOPRIMARY, CHANGE_STELLCURVETOSTELL, CHANGE_STELLATIONOFFSET};
00379 
00380     ChangeShapeDataAction();
00381     virtual ActionCode Execute();
00382     static ActionCode Init( Operation* pOp,
00383                             ActionList* pActionList,
00384                             NodeRegularShape* pShape,
00385                             enum ChangeItem NewItem,
00386                             double NewData,
00387                             Action** NewAction);
00388     static ActionCode DoToggle( Operation* pOp,
00389                                 ActionList* pActionList,
00390                                 NodeRegularShape* pShape,
00391                                 enum ChangeItem NewItem,
00392                                 double NewData);
00393 
00394 private:
00395     NodeRegularShape*   pToggleShape;  
00396     enum ChangeItem     ChangeItemID;
00397     double              NewValue;
00398 };
00399 
00400 
00401 
00402 /********************************************************************************************
00403 
00404 >   class ChangeShapePointAction : public Action
00405 
00406     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00407     Created:    13/12/94
00408     Purpose:    An action to change a point in a regular shape.
00409     SeeAlso:    ChangeShapeDataAction
00410 
00411 ********************************************************************************************/
00412 
00413 class ChangeShapePointAction : public Action
00414 {
00415 
00416 CC_DECLARE_DYNCREATE(ChangeShapePointAction)
00417 
00418 public:
00419     enum ChangeItem {CHANGE_MAJOR, CHANGE_CENTRE, CHANGE_MINOR};
00420 
00421     ChangeShapePointAction();
00422     virtual ActionCode Execute();
00423     static ActionCode Init( Operation* pOp,
00424                             ActionList* pActionList,
00425                             NodeRegularShape* pShape,
00426                             enum ChangeItem NewItem,
00427                             DocCoord NewData,
00428                             Action** NewAction);
00429     static ActionCode DoToggle( Operation* pOp,
00430                                 ActionList* pActionList,
00431                                 NodeRegularShape* pShape,
00432                                 enum ChangeItem NewItem,
00433                                 DocCoord NewData);
00434 
00435 
00436 private:
00437     NodeRegularShape*   pToggleShape;  
00438     enum ChangeItem     ChangeItemID;
00439     DocCoord            NewValue;
00440 };
00441 
00442 
00443 
00444 /********************************************************************************************
00445 
00446 >   class ChangeShapePathAction : public Action
00447 
00448     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00449     Created:    21/12/94
00450     Purpose:    An action to change a path in a regular shape.
00451     SeeAlso:    ChangeShapeDataAction
00452 
00453 ********************************************************************************************/
00454 
00455 class ChangeShapePathAction : public Action
00456 {
00457 
00458 CC_DECLARE_DYNCREATE(ChangeShapePathAction)
00459 
00460 public:
00461     enum ChangeItem {CHANGE_PATH1, CHANGE_PATH2};
00462 
00463     ChangeShapePathAction();
00464     virtual ActionCode Execute();
00465     static ActionCode Init( Operation* pOp,
00466                             ActionList* pActionList,
00467                             NodeRegularShape* pShape,
00468                             enum ChangeItem NewItem,
00469                             Path* NewPath,
00470                             Action** NewAction);
00471     static ActionCode DoReshape( Operation* pOp,
00472                                 ActionList* pActionList,
00473                                 NodeRegularShape* pShape,
00474                                 enum ChangeItem NewItem,
00475                                 Path* NewPath);
00476 private:
00477     NodeRegularShape*   pShape;  
00478     enum ChangeItem     ChangeItemID;
00479     Path                NewEdge;
00480 };
00481 
00482 
00483 
00484 /*********************************************************************************************
00485 >   class ShapeEditedMsg : public Msg
00486 
00487     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00488     Created:    17/1/95
00489     Purpose:    This message is sent whenever a shape is edited.
00490     SeeAlso:    -
00491 
00492 *********************************************************************************************/
00493 
00494 class ShapeEditedMsg : public Msg
00495 {
00496 CC_DECLARE_DYNAMIC(ShapeEditedMsg)
00497 
00498 public:
00499     NodeRegularShape*   pShape;         // Points to the changed shape
00500     Spread* pSpread;                    // Points to the spread containing the shape
00501 
00502     ShapeEditedMsg(NodeRegularShape* pChangeShape, Spread* pParentSpread);
00503 };
00504 
00505 
00506 
00507 
00508 /********************************************************************************************
00509 
00510 >   class OpShapeToggleBase : public SelOperation
00511 
00512     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00513     Created:    17/04/95
00514     Purpose:    This is a base class for operations that toggle certain states of a QuickShape
00515     SeeAlso:    -
00516 
00517 ********************************************************************************************/
00518 
00519 class CCAPI OpShapeToggleBase: public SelOperation
00520 {                           
00521     CC_DECLARE_DYNCREATE( OpShapeToggleBase )    
00522     
00523 public:
00524     OpShapeToggleBase();                
00525     void            Do(OpDescriptor*);  
00526 
00527 protected:
00528     virtual BOOL DoAction(NodeRegularShape* pShape);
00529 };
00530 
00531 
00532 
00533 /********************************************************************************************
00534 
00535 >   class OpShapeToggleElipPoly : public OpShapeToggleBase
00536 
00537     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00538     Created:    16/04/95
00539     Purpose:    This class is an operation that toggles the ellipse/polygon state of all
00540                 selected QuickShapes.
00541     SeeAlso:    OpShapeToggleBase
00542 
00543 ********************************************************************************************/
00544 
00545 class CCAPI OpShapeToggleElipPoly: public OpShapeToggleBase
00546 {                           
00547     CC_DECLARE_DYNCREATE( OpShapeToggleElipPoly )    
00548     
00549 public:
00550     OpShapeToggleElipPoly();                
00551     static BOOL     Init();                 
00552     static OpState  GetState(String_256*, OpDescriptor*);       
00553 protected:
00554     BOOL DoAction(NodeRegularShape* pShape);
00555 };
00556 
00557 
00558 
00559 /********************************************************************************************
00560 
00561 >   class OpShapeToggleCurvature : public OpShapeToggleBase
00562 
00563     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00564     Created:    16/04/95
00565     Purpose:    This class is an operation that toggles the curvature state of all
00566                 selected QuickShapes.
00567     SeeAlso:    OpShapeToggleBase
00568 
00569 ********************************************************************************************/
00570 
00571 class CCAPI OpShapeToggleCurvature: public OpShapeToggleBase
00572 {                           
00573     CC_DECLARE_DYNCREATE( OpShapeToggleCurvature )    
00574     
00575 public:
00576     OpShapeToggleCurvature();               
00577     static BOOL     Init();                 
00578     static OpState  GetState(String_256*, OpDescriptor*);       
00579 protected:
00580     BOOL DoAction(NodeRegularShape* pShape);
00581 };
00582 
00583 
00584 
00585 /********************************************************************************************
00586 
00587 >   class OpShapeToggleStellation : public OpShapeToggleBase
00588 
00589     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00590     Created:    16/04/95
00591     Purpose:    This class is an operation that toggles the stellation state of all
00592                 selected QuickShapes.
00593     SeeAlso:    OpShapeToggleBase
00594 
00595 ********************************************************************************************/
00596 
00597 class CCAPI OpShapeToggleStellation: public OpShapeToggleBase
00598 {                           
00599     CC_DECLARE_DYNCREATE( OpShapeToggleStellation )    
00600     
00601 public:
00602     OpShapeToggleStellation();              
00603     static BOOL     Init();                 
00604     static OpState  GetState(String_256*, OpDescriptor*);       
00605 protected:
00606     BOOL DoAction(NodeRegularShape* pShape);
00607 };
00608 
00609 
00610 
00611 /********************************************************************************************
00612 
00613 >   class OpShapeToggleSetNumSides : public SelOperation
00614 
00615     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00616     Created:    22/04/95
00617     Purpose:    This class is an operation that sets the number of sides of all
00618                 selected QuickShapes.
00619     SeeAlso:    -
00620 
00621 ********************************************************************************************/
00622 
00623 class CCAPI OpShapeToggleSetNumSides: public SelOperation
00624 {                           
00625     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides )    
00626     
00627 public:
00628     OpShapeToggleSetNumSides();             
00629     static OpState  GetState(String_256*, OpDescriptor*);
00630     static BOOL     Init();                 
00631             
00632 protected:
00633     BOOL DoAction(INT32 NewNumSides);
00634 };
00635 
00636 
00637 
00638 /********************************************************************************************
00639 
00640 >   class OpShapeToggleSetNumSides3 : public OpShapeToggleSetNumSides
00641 
00642     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00643     Created:    22/04/95
00644     Purpose:    This class is an operation that sets the number of sides of all
00645                 selected QuickShapes.
00646     SeeAlso:    -
00647 
00648 ********************************************************************************************/
00649 
00650 class CCAPI OpShapeToggleSetNumSides3: public OpShapeToggleSetNumSides
00651 {                           
00652     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides3 )    
00653     
00654 public:
00655     OpShapeToggleSetNumSides3() {};             
00656     void Do(OpDescriptor*); 
00657 };
00658 
00659 
00660 
00661 /********************************************************************************************
00662 
00663 >   class OpShapeToggleSetNumSides4 : public OpShapeToggleSetNumSides
00664 
00665     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00666     Created:    22/04/95
00667     Purpose:    This class is an operation that sets the number of sides of all
00668                 selected QuickShapes.
00669     SeeAlso:    -
00670 
00671 ********************************************************************************************/
00672 
00673 class CCAPI OpShapeToggleSetNumSides4: public OpShapeToggleSetNumSides
00674 {                           
00675     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides4 )    
00676     
00677 public:
00678     OpShapeToggleSetNumSides4() {};             
00679     void Do(OpDescriptor*); 
00680 };
00681 
00682 
00683 
00684 /********************************************************************************************
00685 
00686 >   class OpShapeToggleSetNumSides5 : public OpShapeToggleSetNumSides
00687 
00688     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00689     Created:    22/04/95
00690     Purpose:    This class is an operation that sets the number of sides of all
00691                 selected QuickShapes.
00692     SeeAlso:    -
00693 
00694 ********************************************************************************************/
00695 
00696 class CCAPI OpShapeToggleSetNumSides5: public OpShapeToggleSetNumSides
00697 {                           
00698     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides5 )    
00699     
00700 public:
00701     OpShapeToggleSetNumSides5() {};             
00702     void Do(OpDescriptor*); 
00703 };
00704 
00705 
00706 
00707 /********************************************************************************************
00708 
00709 >   class OpShapeToggleSetNumSides6 : public OpShapeToggleSetNumSides
00710 
00711     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00712     Created:    22/04/95
00713     Purpose:    This class is an operation that sets the number of sides of all
00714                 selected QuickShapes.
00715     SeeAlso:    -
00716 
00717 ********************************************************************************************/
00718 
00719 class CCAPI OpShapeToggleSetNumSides6: public OpShapeToggleSetNumSides
00720 {                           
00721     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides6 )    
00722     
00723 public:
00724     OpShapeToggleSetNumSides6() {};             
00725     void Do(OpDescriptor*); 
00726 };
00727 
00728 
00729 
00730 /********************************************************************************************
00731 
00732 >   class OpShapeToggleSetNumSides7 : public OpShapeToggleSetNumSides
00733 
00734     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00735     Created:    22/04/95
00736     Purpose:    This class is an operation that sets the number of sides of all
00737                 selected QuickShapes.
00738     SeeAlso:    -
00739 
00740 ********************************************************************************************/
00741 
00742 class CCAPI OpShapeToggleSetNumSides7: public OpShapeToggleSetNumSides
00743 {                           
00744     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides7 )    
00745     
00746 public:
00747     OpShapeToggleSetNumSides7() {};             
00748     void Do(OpDescriptor*); 
00749 };
00750 
00751 
00752 
00753 /********************************************************************************************
00754 
00755 >   class OpShapeToggleSetNumSides8 : public OpShapeToggleSetNumSides
00756 
00757     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00758     Created:    22/04/95
00759     Purpose:    This class is an operation that sets the number of sides of all
00760                 selected QuickShapes.
00761     SeeAlso:    -
00762 
00763 ********************************************************************************************/
00764 
00765 class CCAPI OpShapeToggleSetNumSides8: public OpShapeToggleSetNumSides
00766 {                           
00767     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides8 )    
00768     
00769 public:
00770     OpShapeToggleSetNumSides8() {};             
00771     void Do(OpDescriptor*); 
00772 };
00773 
00774 
00775 
00776 /********************************************************************************************
00777 
00778 >   class OpShapeToggleSetNumSides9 : public OpShapeToggleSetNumSides
00779 
00780     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00781     Created:    22/04/95
00782     Purpose:    This class is an operation that sets the number of sides of all
00783                 selected QuickShapes.
00784     SeeAlso:    -
00785 
00786 ********************************************************************************************/
00787 
00788 class CCAPI OpShapeToggleSetNumSides9: public OpShapeToggleSetNumSides
00789 {                           
00790     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides9 )    
00791     
00792 public:
00793     OpShapeToggleSetNumSides9() {};             
00794     void Do(OpDescriptor*); 
00795 };
00796 
00797 
00798 
00799 /********************************************************************************************
00800 
00801 >   class OpShapeToggleSetNumSides10 : public OpShapeToggleSetNumSides
00802 
00803     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00804     Created:    22/04/95
00805     Purpose:    This class is an operation that sets the number of sides of all
00806                 selected QuickShapes.
00807     SeeAlso:    -
00808 
00809 ********************************************************************************************/
00810 
00811 class CCAPI OpShapeToggleSetNumSides10: public OpShapeToggleSetNumSides
00812 {                           
00813     CC_DECLARE_DYNCREATE( OpShapeToggleSetNumSides10 )    
00814     
00815 public:
00816     OpShapeToggleSetNumSides10() {};                
00817     void Do(OpDescriptor*); 
00818 };
00819 
00820 
00821 
00822 /********************************************************************************************
00823 
00824 >   class OpShapeMakeRegular : public SelOperation
00825 
00826     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00827     Created:    23/04/95
00828     Purpose:    This is an operation that makes one QuickShape regular
00829     SeeAlso:    -
00830 
00831 ********************************************************************************************/
00832 
00833 class CCAPI OpShapeMakeRegular: public SelOperation
00834 {                           
00835     CC_DECLARE_DYNCREATE( OpShapeMakeRegular )    
00836     
00837 public:
00838     OpShapeMakeRegular() {};
00839     static OpState  GetState(String_256*, OpDescriptor*);
00840     static BOOL     Init();                 
00841     void            DoMakeRegular(NodeRegularShape* pShape, DocCoord RegularPoint); 
00842 
00843 protected:
00844     BOOL DoActions(NodeRegularShape* pShape, DocCoord RegularPoint);
00845 
00846 };
00847 
00848 
00849 
00850 
00851 #endif  // INC_SHAPEOPS

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