00001 // $Id: zordops.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 /*$Log*/ 00099 00100 #ifndef INC_ZORDOPS 00101 #define INC_ZORDOPS 00102 00103 00104 //#include "selop.h" - in camtypes.h [AUTOMATICALLY REMOVED] 00105 00106 #define OPTOKEN_BRINGTOFRONT _T("BringToFront") 00107 #define OPTOKEN_PUTTOBACK _T("PutToBack") 00108 #define OPTOKEN_MOVEFORWARDS _T("MoveForwards") 00109 #define OPTOKEN_MOVEBACKWARDS _T("MoveBackwards") 00110 #define OPTOKEN_MOVELAYERBEHIND _T("MoveBackwardsALayer") 00111 #define OPTOKEN_MOVELAYERINFRONT _T("MoveForwardsALayer") 00112 00113 00114 enum MODE { LAYER, FRAME }; 00115 00116 00117 /******************************************************************************************** 00118 00119 > class OpBringToFront : public SelOperation 00120 00121 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00122 Created: 9/7/93 00123 Purpose: This class represents the BringToFront operation. 00124 SeeAlso: OpPutToBack 00125 SeeAlso: OpMoveForwards 00126 SeeAlso: OpMoveBackwards 00127 Documentation: specs\grpzord.doc 00128 00129 ********************************************************************************************/ 00130 00131 class CCAPI OpBringToFront: public SelOperation 00132 { 00133 00134 CC_DECLARE_DYNCREATE( OpBringToFront ) 00135 00136 public: 00137 OpBringToFront(); 00138 static BOOL Init(); 00139 static OpState GetState(String_256*, OpDescriptor*); 00140 void Do(OpDescriptor*); 00141 00142 }; 00143 00144 00145 /******************************************************************************************** 00146 00147 > class OpPutToBack : public SelOperation 00148 00149 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00150 Created: 9/7/93 00151 Purpose: This class represents the PutToBack operation. 00152 SeeAlso: OpBringToFront 00153 SeeAlso: OpMoveForwards 00154 SeeAlso: OpMoveBackwards 00155 Documentation: specs\grpzord.doc 00156 00157 00158 ********************************************************************************************/ 00159 00160 class CCAPI OpPutToBack: public SelOperation 00161 { 00162 00163 CC_DECLARE_DYNCREATE( OpPutToBack ) 00164 00165 public: 00166 OpPutToBack(); 00167 static BOOL Init(); 00168 static OpState GetState(String_256*, OpDescriptor*); 00169 void Do(OpDescriptor*); 00170 00171 // Karim 21/01/2000 - see UndoableOperation base implementation. 00172 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00173 }; 00174 00175 /******************************************************************************************** 00176 00177 > class OpMoveForwards : public UndoableOperation 00178 00179 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00180 Created: 9/7/93 00181 Purpose: This class represents the OpMoveForwards operation. 00182 SeeAlso: OpBringToFront 00183 SeeAlso: OpPutToBack 00184 SeeAlso: OpMoveBackwards 00185 Documentation: specs\grpzord.doc 00186 00187 00188 ********************************************************************************************/ 00189 00190 class CCAPI OpMoveForwards: public SelOperation 00191 { 00192 00193 CC_DECLARE_DYNCREATE( OpMoveForwards ) 00194 00195 public: 00196 OpMoveForwards(); 00197 static BOOL Init(); 00198 // static OpState GetState(String_256*, OpDescriptor*); 00199 void Do(OpDescriptor*); 00200 00201 // Karim 21/01/2000 - see UndoableOperation base implementation. 00202 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00203 }; 00204 00205 /******************************************************************************************** 00206 00207 > class OpMoveBackwards : public SelOperation 00208 00209 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00210 Created: 9/7/93 00211 Purpose: This class represents the MoveBackwards operation. 00212 SeeAlso: OpBringToFront 00213 SeeAlso: OpPutToBack 00214 SeeAlso: OpMoveForwards 00215 Documentation: specs\grpzord.doc 00216 00217 00218 ********************************************************************************************/ 00219 00220 class CCAPI OpMoveBackwards: public SelOperation 00221 { 00222 CC_DECLARE_DYNCREATE( OpMoveBackwards ) 00223 00224 public: 00225 OpMoveBackwards(); 00226 static BOOL Init(); 00227 // static OpState GetState(String_256*, OpDescriptor*); 00228 void Do(OpDescriptor*); 00229 00230 // Karim 21/01/2000 - see UndoableOperation base implementation. 00231 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00232 }; 00233 00234 00235 /******************************************************************************************** 00236 00237 > class OpMoveToLyrInFront : public SelOperation 00238 00239 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00240 Created: 11/05/94 00241 Purpose: This class represents the move to layer in front operation. 00242 SeeAlso: OpBringToFront 00243 SeeAlso: OpPutToBack 00244 SeeAlso: OpMoveForwards 00245 SeeAlso: OpMoveBackwards 00246 SeeAlso: OpMoveToLyrBehind 00247 Documentation: specs\grpzord.doc 00248 00249 00250 ********************************************************************************************/ 00251 00252 class CCAPI OpMoveToLyrInFront: public SelOperation 00253 { 00254 CC_DECLARE_DYNCREATE( OpMoveToLyrInFront ) 00255 00256 public: 00257 OpMoveToLyrInFront(); 00258 static BOOL Init(); 00259 static OpState GetState(String_256*, OpDescriptor*); 00260 void Do(OpDescriptor*); 00261 00262 // Karim 21/01/2000 - see UndoableOperation base implementation. 00263 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00264 }; 00265 00266 00267 /******************************************************************************************** 00268 00269 > class OpMoveToLyrBehind : public SelOperation 00270 00271 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> 00272 Created: 9/7/93 00273 Purpose: This class represents the move to layer behind operation. 00274 SeeAlso: OpBringToFront 00275 SeeAlso: OpPutToBack 00276 SeeAlso: OpMoveForwards 00277 SeeAlso: OpMoveBackwards 00278 SeeAlso: OpMoveToLyrInFront 00279 Documentation: specs\grpzord.doc 00280 00281 00282 ********************************************************************************************/ 00283 00284 class CCAPI OpMoveToLyrBehind: public SelOperation 00285 { 00286 CC_DECLARE_DYNCREATE( OpMoveToLyrBehind ) 00287 00288 public: 00289 OpMoveToLyrBehind(); 00290 static BOOL Init(); 00291 static OpState GetState(String_256*, OpDescriptor*); 00292 void Do(OpDescriptor*); 00293 00294 // Karim 21/01/2000 - see UndoableOperation base implementation. 00295 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00296 }; 00297 00298 /******************************************************************************************** 00299 00300 > class OpCombineLayersToFrameLayer : public SelOperation 00301 00302 Author: Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com> 00303 Created: 18/6/97 00304 Purpose: This class represents the OpCombineLayersToFrameLayer operation. 00305 00306 ********************************************************************************************/ 00307 00308 #define OPTOKEN_COMBINELAYERSTOFRAMELAYER _T("CombineLayersToFrameLayer") 00309 00310 class CCAPI OpCombineLayersToFrameLayer: public SelOperation 00311 { 00312 CC_DECLARE_DYNCREATE( OpCombineLayersToFrameLayer ) 00313 00314 public: 00315 OpCombineLayersToFrameLayer(); 00316 00317 static BOOL Init(); 00318 static OpState GetState(String_256*, OpDescriptor*); 00319 00320 virtual void Do( OpDescriptor * pOpDesc ); 00321 virtual void DoWithParam(OpDescriptor* pOpDesc, OpParam* pParam); 00322 00323 // Karim 21/01/2000 - see UndoableOperation base implementation. 00324 virtual BOOL MayChangeNodeBounds() const { return FALSE; } 00325 }; 00326 00327 /******************************************************************************************** 00328 00329 > class FrameInFrontOpDescriptor : public OpDescriptor 00330 00331 Author: Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com> 00332 Created: 21/10/97 00333 Purpose: New FrameInFrontOpDescriptor class whose purpose is to allow an OpDescriptor 00334 to be created which allows us to over-ride the virtual function GetText. 00335 00336 ********************************************************************************************/ 00337 00338 class FrameInFrontOpDescriptor : public OpDescriptor 00339 { 00340 CC_DECLARE_DYNAMIC( FrameInFrontOpDescriptor ); 00341 00342 public: 00343 FrameInFrontOpDescriptor( const TCHAR* pcszToken, 00344 CCRuntimeClass* pClass = CC_RUNTIME_CLASS(FrameInFrontOpDescriptor), 00345 pfnGetState gs = FrameInFrontOpDescriptor::GetState 00346 ); 00347 00348 // This will use the TextID to obtain a string resource text description of the operation. 00349 virtual BOOL GetText(String_256* Description, OpTextFlags WhichText); 00350 00351 static OpState GetState(String_256* psName, OpDescriptor* pOpDesc); 00352 }; 00353 00354 00355 /******************************************************************************************** 00356 00357 > class FrameBehindOpDescriptor : public OpDescriptor 00358 00359 Author: Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com> 00360 Created: 21/10/97 00361 Purpose: New FrameBehindOpDescriptor class whose purpose is to allow an OpDescriptor 00362 to be created which allows us to over-ride the virtual function GetText. 00363 00364 ********************************************************************************************/ 00365 00366 class FrameBehindOpDescriptor : public OpDescriptor 00367 { 00368 CC_DECLARE_DYNAMIC( FrameBehindOpDescriptor ); 00369 00370 public: 00371 FrameBehindOpDescriptor( const TCHAR* pcszToken, 00372 CCRuntimeClass* pClass = CC_RUNTIME_CLASS(FrameBehindOpDescriptor), 00373 pfnGetState gs = FrameBehindOpDescriptor::GetState 00374 ); 00375 00376 // This will use the TextID to obtain a string resource text description of the operation. 00377 virtual BOOL GetText(String_256* Description, OpTextFlags WhichText); 00378 00379 static OpState GetState(String_256* psName, OpDescriptor* pOpDesc); 00380 }; 00381 00382 #endif 00383 00384 00385