00001 // $Id: ngsetop.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 $Header: /Camelot/kernel/ngsetop.h 6 28/07/00 11:51 Simonk $ 00100 Operations to manipulate sets and names of objects. 00101 */ 00102 00103 #ifndef NGSETOP_H 00104 #define NGSETOP_H 00105 00106 //#include "selop.h" - in camtypes.h [AUTOMATICALLY REMOVED] 00107 #include "ngiter.h" 00108 00109 class SGNameItem; 00110 class NodeBarProperty; 00111 struct BarDataType; 00112 00113 00114 /******************************************************************************************** 00115 > class CCAPI OpSelectSet : public Operation 00116 00117 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00118 Created: 21/9/99 00119 Purpose: Changes the selection state of the given set of objects (SGNameItem*). 00120 ********************************************************************************************/ 00121 00122 #define OPTOKEN_SELECT_SET _T("SelectSetOfObjects") 00123 00124 class CCAPI OpSelectSet : public Operation 00125 { 00126 CC_DECLARE_DYNCREATE(OpSelectSet); 00127 virtual void DoWithParam(OpDescriptor*, OpParam*); 00128 // GetState is GREY_WHEN_NO_CURRENT_DOC 00129 }; 00130 00131 00132 00133 /******************************************************************************************** 00134 > class CCAPI OpSelectUnionSets : public Operation 00135 00136 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00137 Created: 21/9/99 00138 Purpose: Selects the union of all objects with highlighted names in the 00139 Attribute gallery. 00140 ********************************************************************************************/ 00141 00142 #define OPTOKEN_SELECT_UNION_SETS _T("SelectUnionOfSets") 00143 00144 class CCAPI OpSelectUnionSets : public Operation 00145 { 00146 CC_DECLARE_DYNCREATE(OpSelectUnionSets); 00147 virtual void Do(OpDescriptor*); 00148 public: 00149 static OpState GetState(String_256*, OpDescriptor*); 00150 }; 00151 00152 00153 00154 /******************************************************************************************** 00155 > class CCAPI OpSelectIntersectSets : public Operation 00156 00157 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00158 Created: 21/9/99 00159 Purpose: Selects the intersection of all objects with highlighted names in the 00160 Attribute gallery. 00161 ********************************************************************************************/ 00162 00163 #define OPTOKEN_SELECT_INTERSECT_SETS _T("SelectIntersectOfSets") 00164 00165 class CCAPI OpSelectIntersectSets : public Operation 00166 { 00167 CC_DECLARE_DYNCREATE(OpSelectIntersectSets); 00168 virtual void Do(OpDescriptor*); 00169 public: 00170 static OpState GetState(String_256*, OpDescriptor*); 00171 }; 00172 00173 00174 00175 /******************************************************************************************** 00176 > class CCAPI OpApplyNamesToSel : public SelOperation 00177 00178 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00179 Created: 21/9/99 00180 Purpose: Applies names highlighted in the Attribute gallery, or a name 00181 passed as a string parameter, to the selected objects. 00182 Notes: There are two OpDescriptors for this operation, 00183 OPTOKEN_APPLY_NAMES_TO_SEL (invoking Do) which applies the highlighted 00184 names in the Attribute gallery to the selected objects, and 00185 OPTOKEN_APPLY_NAME_TO_SEL (invoking DoWithParam), which applies as a 00186 name a character string argument (a StringBase* cast into OpParam::Param1) 00187 to the selected objects. 00188 ********************************************************************************************/ 00189 00190 #define OPTOKEN_APPLY_NAMES_TO_SEL _T("ApplyNamesToSelectedObjects") 00191 #define OPTOKEN_APPLY_NAME_TO_SEL _T("ApplyNameToSelectedObjects") 00192 00193 class CCAPI OpApplyNamesToSel : public SelOperation 00194 { 00195 CC_DECLARE_DYNCREATE(OpApplyNamesToSel); 00196 virtual void Do(OpDescriptor*); 00197 virtual void DoWithParam(OpDescriptor*, OpParam*); 00198 public: 00199 static OpState GetState(String_256*, OpDescriptor*); // for multiple version 00200 }; 00201 00202 00203 00204 /******************************************************************************************** 00205 > class CCAPI OpApplyNamesToOne : public UndoableOperation 00206 00207 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00208 Created: 21/9/99 00209 Purpose: Applies names highlighted in the Attribute gallery to a given 00210 object. Executed by the Attribute gallery's drag'n'drop system. 00211 ********************************************************************************************/ 00212 00213 #define OPTOKEN_APPLY_NAMES_TO_ONE _T("ApplyNamesToOneObject") 00214 00215 class CCAPI OpApplyNamesToOne : public UndoableOperation 00216 { 00217 CC_DECLARE_DYNCREATE(OpApplyNamesToOne); 00218 virtual void DoWithParam(OpDescriptor*, OpParam* pOpParam); 00219 00220 public: 00221 static OpState GetState(String_256*, OpDescriptor*); 00222 00223 // Karim 21/01/2000 - see UndoableOperation base implementation. 00224 virtual BOOL MayChangeNodeBounds() const { return TRUE; } 00225 }; 00226 00227 00228 00229 /******************************************************************************************** 00230 > class CCAPI OpApplyNameToNone : public UndoableOperation 00231 00232 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00233 Created: 21/9/99 00234 Purpose: Applies the given name to no objects (ie. just to the NodeSetSentinel 00235 object). 00236 ********************************************************************************************/ 00237 00238 #define OPTOKEN_APPLY_NAME_TO_NONE _T("ApplyNameToNoObjects") 00239 00240 class CCAPI OpApplyNameToNone : public UndoableOperation 00241 { 00242 CC_DECLARE_DYNCREATE(OpApplyNameToNone); 00243 virtual void DoWithParam(OpDescriptor*, OpParam* pOpParam); 00244 // GetState is GREY_WHEN_NO_CURRENT_DOC 00245 }; 00246 00247 00248 00249 /******************************************************************************************** 00250 > class CCAPI OpRemoveNamesFromSel : public UndoableOperation 00251 00252 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00253 Created: 21/9/99 00254 Purpose: Removes (hides) highlighted names in the Attribute gallery from the 00255 selected objects. 00256 ********************************************************************************************/ 00257 00258 #define OPTOKEN_REMOVE_NAMES_FROM_SEL _T("RemoveNamesFromSelectedObjects") 00259 00260 class CCAPI OpRemoveNamesFromSel : public SelOperation 00261 { 00262 CC_DECLARE_DYNCREATE(OpRemoveNamesFromSel); 00263 virtual void Do(OpDescriptor*); 00264 // GetState same as OPTOKEN_APPLY_NAMES_TO_SEL 00265 }; 00266 00267 00268 00269 /******************************************************************************************** 00270 > class CCAPI OpDeleteNamesFromAll : public UndoableOperation 00271 00272 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00273 Created: 21/9/99 00274 Purpose: Deletes (hides) names highlighted in the Attribute gallery from all 00275 objects. 00276 ********************************************************************************************/ 00277 00278 #define OPTOKEN_DELETE_NAMES_FROM_ALL _T("DeleteNamesFromAllObjects") 00279 00280 class CCAPI OpDeleteNamesFromAll : public UndoableOperation 00281 { 00282 CC_DECLARE_DYNCREATE(OpDeleteNamesFromAll); 00283 virtual void Do(OpDescriptor*); 00284 // GetState same as OPTOKEN_SELECT_UNION_SETS 00285 }; 00286 00287 00288 00289 /******************************************************************************************** 00290 > class CCAPI OpRenameAll : public UndoableOperation 00291 00292 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00293 Created: 21/9/99 00294 Purpose: Renames the objects with highlighted names in the Attribute gallery 00295 to the new name in a string parameter. 00296 ********************************************************************************************/ 00297 00298 #define OPTOKEN_RENAME_ALL _T("RenameAllObjects") 00299 00300 class CCAPI OpRenameAll : public UndoableOperation 00301 { 00302 CC_DECLARE_DYNCREATE(OpRenameAll); 00303 virtual void DoWithParam(OpDescriptor*, OpParam*); 00304 // GetState same as OPTOKEN_APPLY_NAMES_TO_ONE 00305 00306 // Karim 21/01/2000 - see UndoableOperation base implementation. 00307 virtual BOOL MayChangeNodeBounds() const { return TRUE; } 00308 }; 00309 00310 00311 00312 /******************************************************************************************** 00313 > class CCAPI OpRedefineNamesAsSel : public SelOperation 00314 00315 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00316 Created: 21/9/99 00317 Purpose: Redefines (reapplies) the names highlighted in the Attribute gallery 00318 as the selected objects. 00319 ********************************************************************************************/ 00320 00321 #define OPTOKEN_REDEFINE_NAMES_AS_SEL _T("RedefineNamesAsSelectedObjects") 00322 00323 class CCAPI OpRedefineNamesAsSel : public SelOperation 00324 { 00325 CC_DECLARE_DYNCREATE(OpRedefineNamesAsSel); 00326 virtual void Do(OpDescriptor*); 00327 // GetState same as OPTOKEN_APPLY_NAMES_TO_SEL 00328 }; 00329 00330 00331 00332 00333 /******************************************************************************************** 00334 > class CCAPI OpExportSets : public Operation 00335 00336 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00337 Created: 21/9/99 00338 Purpose: Exports sets of objects highlighted in the Attribute gallery. 00339 ********************************************************************************************/ 00340 00341 #define OPTOKEN_EXPORT_SETS _T("ExportSets") 00342 00343 class CCAPI OpExportSets : public Operation 00344 { 00345 CC_DECLARE_DYNCREATE(OpExportSets); 00346 virtual void Do(OpDescriptor*); 00347 static OpState GetState(String_256*, OpDescriptor*); 00348 00349 00350 /******************************************************************************************** 00351 > class CCAPI OpExpotrSets::ExportHighlightedIter : public NameItemIter 00352 00353 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00354 Created: 23/11/1999 00355 Purpose: Iterates over highlighted set items, re-exporting any that are 00356 export targets. 00357 ********************************************************************************************/ 00358 00359 class CCAPI ExportHighlightedIter : public NameItemIter 00360 { 00361 public: 00362 ExportHighlightedIter(OpExportSets* pOp); 00363 virtual ~ExportHighlightedIter(); 00364 00365 protected: 00366 virtual BOOL Do(SGNameItem*); 00367 00368 OpExportSets* m_pOp; 00369 String_256 m_strExtErrors; 00370 }; 00371 }; 00372 00373 00374 00375 /******************************************************************************************** 00376 > class CCAPI OpChangeSetProperty : public UndoableOperation 00377 00378 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00379 Created: 21/9/99 00380 Purpose: Changes the set property associated with the SGNameProp* passed 00381 in OpParam::Param1. 00382 ********************************************************************************************/ 00383 00384 #define OPTOKEN_CHANGE_SET_PROPERTY _T("ChangeSetProperty") 00385 00386 class CCAPI OpChangeSetProperty : public UndoableOperation 00387 { 00388 CC_DECLARE_DYNCREATE(OpChangeSetProperty); 00389 virtual void DoWithParam(OpDescriptor*, OpParam* pParam); 00390 // GetState is GREY_WHEN_NO_CURRENT_DOC 00391 }; 00392 00393 00394 00395 /******************************************************************************************** 00396 > class CCAPI OpChangeBarProperty : public UndoableOperation 00397 class CCAPI OpChangeBarPropParam : public OpParam 00398 00399 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00400 Created: 21/9/99 00401 Purpose: Changes the bar property passed in OpChangeBarPropParam. 00402 ********************************************************************************************/ 00403 00404 #define OPTOKEN_CHANGE_BAR_PROPERTY _T("ChangeBarProperty") 00405 00406 class CCAPI OpChangeBarProperty : public UndoableOperation 00407 { 00408 CC_DECLARE_DYNCREATE(OpChangeBarProperty); 00409 virtual void DoWithParam(OpDescriptor*, OpParam* pParam); 00410 // GetState is GREY_WHEN_NO_CURRENT_DOC 00411 00412 virtual BOOL MayChangeNodeBounds() const { return TRUE; } 00413 INT32 m_BarIndex; // used by the undo and redo 00414 BOOL m_MakingLive; // Does this op turn the live stretching back on? Used in extending (ngcore.cpp) 00415 00416 static BOOL DoChangeBarProperty(UndoableOperation * pOp, INT32 Index, NodeBarProperty* pProp, const BarDataType * pBarData, BOOL * pMadeLive = NULL); 00417 }; 00418 00419 00420 struct CCAPI OpChangeBarPropParam : public OpParam 00421 { 00422 NodeBarProperty* m_Prop; 00423 INT32 m_nIndex; 00424 const BarDataType* m_pbdtInfo; 00425 }; 00426 00427 00428 00429 /******************************************************************************************** 00430 > class CCAPI OpChangeBarExtends : public UndoableOperation 00431 class CCAPI OpChangeBarPropParam : public OpParam 00432 00433 Author: Justin_Flude (Xara Group Ltd) <camelotdev@xara.com> 00434 Created: 21/9/99 00435 Purpose: Changes the extending method (ie the flag) for every named set that has 00436 a matching m_BarNumber to that passed in. 00437 ********************************************************************************************/ 00438 00439 #define OPTOKEN_CHANGE_BAR_EXTENDS _T("ChangeBarExtends") 00440 00441 class CCAPI OpChangeBarExtends : public UndoableOperation 00442 { 00443 CC_DECLARE_DYNCREATE(OpChangeBarExtends); 00444 virtual void DoWithParam(OpDescriptor*, OpParam* pParam); 00445 // GetState is GREY_WHEN_NO_CURRENT_DOC 00446 }; 00447 00448 00449 00450 // This function is responsible for initialising all other components of the Attribute 00451 // gallery. 00452 BOOL InitNamingSystem(); 00453 00454 #endif /* !NGSETOP_H */