4 ** $VER: undo.h 41.1 (23 Mar 2009 21:05:36)
6 ** scalosgfx.library include
8 ** (C) Copyright 2009 The Scalos Team
13 #include <exec/types.h>
16 #ifndef UTILITY_TAGITEM_H
17 #include <utility/tagitem.h>
18 #endif //UTILITY_TAGITEM_H
20 //----------------------------------------------------------------------------
24 UNDO_Snapshot
, // UNDOTAG_IconDirLock, UNDOTAG_SaveIcon, UNDOTAG_IconNode
25 UNDO_Unsnapshot
, // UNDOTAG_IconDirLock, UNDOTAG_SaveIcon, UNDOTAG_IconNode
26 UNDO_Cleanup
, // UNDOTAG_CleanupMode, UNDOTAG_WindowTask, UNDOTAG_IconList
27 UNDO_Copy
, // UNDOTAG_CopySrcDirLock, UNDOTAG_CopyDestDirLock, UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
28 UNDO_Move
, // UNDOTAG_CopySrcDirLock, UNDOTAG_CopyDestDirLock, UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
29 UNDO_CreateLink
, // UNDOTAG_CopySrcDirLock, UNDOTAG_CopyDestDirLock, UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
30 UNDO_ChangeIconPos
, // UNDOTAG_IconDirLock, UNDOTAG_IconNode,
31 UNDO_Rename
, // UNDOTAG_CopySrcDirLock, UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
32 UNDO_Relabel
, // UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
33 UNDO_Delete
, // UNDOTAG_CopySrcDirLock, UNDOTAG_CopySrcName, UNDOTAG_CopyDestName
34 UNDO_Leaveout
, // UNDOTAG_IconDirLock, UNDOTAG_IconName
35 UNDO_PutAway
, // UNDOTAG_IconDirLock, UNDOTAG_IconName
36 UNDO_NewDrawer
, // UNDOTAG_IconDirLock, UNDOTAG_IconName, UNDOTAG_CreateIcon
37 UNDO_SizeWindow
, // UNDOTAG_WindowTask, UNDOTAG_OldWindowLeft, UNDOTAG_OldWindowTop, UNDOTAG_OldWindowWidth, UNDOTAG_OldWindowHeight, UNDOTAG_OldWindowVirtX, UNDOTAG_OldWindowVirtY,UNDOTAG_NewWindowLeft,UNDOTAG_NewWindowTop,UNDOTAG_NewWindowWidth,UNDOTAG_NewWindowHeight,UNDOTAG_NewWindowVirtX,UNDOTAG_NewWindowVirtY
38 UNDO_SetProtection
, // UNDOTAG_IconDirLock, UNDOTAG_IconName, UNDOTAG_OldProtection, UNDOTAG_NewProtection
39 UNDO_SetComment
, // UNDOTAG_IconDirLock, UNDOTAG_IconName, UNDOTAG_OldComment, UNDOTAG_NewComment
40 UNDO_SetToolTypes
, // UNDOTAG_IconDirLock, UNDOTAG_IconName, UNDOTAG_OldToolTypes, UNDOTAG_NewToolTypes
41 UNDO_ChangeIconObject
, // UNDOTAG_IconDirLock, UNDOTAG_IconName, UNDOTAG_OldIconObject, UNDOTAG_NewIconObject
42 UNDO_CloseWindow
, // UNDOTAG_WindowTask
47 UNDOTAG_UndoMultiStep
= (int) (TAG_USER
+ 1287),
48 UNDOTAG_IconNode
, // struct ScaIconNode *
49 UNDOTAG_IconList
, // struct ScaIconNode *
50 UNDOTAG_IconDirLock
, // BPTR
51 UNDOTAG_CopySrcDirLock
, // BPTR
52 UNDOTAG_CopyDestDirLock
, // BPTR
53 UNDOTAG_CopySrcName
, // CONST_STRPTR
54 UNDOTAG_CopyDestName
, // CONST_STRPTR
55 UNDOTAG_IconPosX
, // LONG
56 UNDOTAG_IconPosY
, // LONG
57 UNDOTAG_OldIconPosX
, // LONG
58 UNDOTAG_OldIconPosY
, // LONG
59 UNDOTAG_WindowTask
, // struct internalScaWindowTask *
60 UNDOTAG_CleanupMode
, // ULONG
61 UNDOTAG_UndoHook
, // struct Hook *
62 UNDOTAG_RedoHook
, // struct Hook *
63 UNDOTAG_DisposeHook
, // struct Hook *
64 UNDOTAG_SaveIcon
, // ULONG
65 UNDOTAG_CustomAddHook
, // struct Hook *
66 UNDOTAG_WbArg
, // struct WBArg *
67 UNDOTAG_OldWindowLeft
, // LONG
68 UNDOTAG_OldWindowTop
, // LONG
69 UNDOTAG_OldWindowWidth
, // ULONG
70 UNDOTAG_OldWindowHeight
, // ULONG
71 UNDOTAG_NewWindowLeft
, // LONG
72 UNDOTAG_NewWindowTop
, // LONG
73 UNDOTAG_NewWindowWidth
, // ULONG
74 UNDOTAG_NewWindowHeight
, // ULONG
75 UNDOTAG_OldWindowVirtX
, // LONG
76 UNDOTAG_OldWindowVirtY
, // LONG
77 UNDOTAG_NewWindowVirtX
, // LONG
78 UNDOTAG_NewWindowVirtY
, // LONG
79 UNDOTAG_CreateIcon
, // LONG
80 UNDOTAG_IconName
, // CONST_STRPTR
81 UNDOTAG_OldProtection
, // ULONG
82 UNDOTAG_NewProtection
, // ULONG
83 UNDOTAG_OldComment
, // CONST_STRPTR
84 UNDOTAG_NewComment
, // CONST_STRPTR
85 UNDOTAG_OldToolTypes
, // const STRPTR *
86 UNDOTAG_NewToolTypes
, // const STRPTR *
87 UNDOTAG_OldIconObject
, // Object *
88 UNDOTAG_NewIconObject
, // Object *
91 enum ScalosUndoCleanupMode
100 struct UndoCleanupIconEntry
102 const struct ScaIconNode
*ucin_IconNode
;
103 LONG ucin_Left
; // original x position of icon
104 LONG ucin_Top
; // original y position of icon
109 struct Node uev_Node
;
110 enum ScalosUndoType uev_Type
;
112 struct Hook
*uev_UndoHook
;
113 struct Hook
*uev_RedoHook
;
114 struct Hook
*uev_DisposeHook
;
115 struct Hook
*uev_CustomAddHook
;
124 APTR uev_PrivateData
;
125 struct UndoCopyMoveEventData
127 // we do not keep Locks to src/dest directories here since it wouldn't be nice to block rename/delete of referenced objects!
128 STRPTR ucmed_srcDirName
;
129 STRPTR ucmed_destDirName
;
130 STRPTR ucmed_srcName
;
131 STRPTR ucmed_destName
;
133 struct UndoNewDrawerData
135 // we do not keep Locks to src directory here since it wouldn't be nice to block rename/delete of referenced objects!
140 struct UndoIconEventData
142 // we do not keep Locks to icon directory here since it wouldn't be nice to block rename/delete of referenced objects!
146 struct UndoCleanupData
148 enum ScalosUndoCleanupMode ucd_CleanupMode
;
149 struct UndoCleanupIconEntry
*ucd_Icons
;
150 ULONG ucd_IconCount
; // number of entries in ucd_Icons
151 struct ScaWindowTask
*ucd_WindowTask
;
152 STRPTR ucd_WindowTitle
; // a copy of the window title of ucd_WindowTask
154 struct UndoSnaphotIconData
157 STRPTR usid_IconName
;
158 Object
*usid_IconObj
; // Iconobject BEFORE snapshot/unsnaphot
161 struct UndoSizeWindowData
163 struct ScaWindowTask
*uswd_WindowTask
;
164 STRPTR uswd_WindowTitle
; // a copy of the window title of ucd_WindowTask
168 ULONG uswd_OldHeight
;
172 ULONG uswd_NewHeight
;
177 } uev_SizeWindowData
;
178 struct UndoSetProtectionData
181 STRPTR uspd_IconName
;
182 ULONG uspd_OldProtection
;
183 ULONG uspd_NewProtection
;
184 } uev_SetProtectionData
;
185 struct UndoSetCommentData
188 STRPTR uscd_IconName
;
189 STRPTR uscd_OldComment
;
190 STRPTR uscd_NewComment
;
191 } uev_SetCommentData
;
192 struct UndoSetToolTypesData
195 STRPTR ustd_IconName
;
196 STRPTR
*ustd_OldToolTypes
;
197 STRPTR
*ustd_NewToolTypes
;
198 } uev_SetToolTypesData
;
199 struct UndoChangeIconObjectData
201 STRPTR uciod_DirName
;
202 STRPTR uciod_IconName
;
203 Object
*uciod_OldIconObject
;
204 Object
*uciod_NewIconObject
;
205 } uev_ChangeIconObjectData
;
206 struct UndoCloseWindowData
209 STRPTR ucwd_WindowTitle
;
217 UBYTE ucwd_Viewmodes
;
218 } uev_CloseWindowData
;
221 struct UndoStep
*uev_UndoStep
;
223 ULONG uev_DescrMsgIDSingle
;
224 ULONG uev_DescrMsgIDMultiple
;
225 STRPTR
*uev_DescrObjName
;
228 /*----------------------------------------------------------------------------------*/
230 #endif /* SCALOS_UNDO_H */