-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Add editing history, with methods:
<=TSizeCtrlHistory=>
Methods:
BeginUndoBlock
EndUndoBlock
Undo
Restore (Undoes all of the actions)
UndoIndex(index:integer;method: TSizeCtrlIndexShift) (Undoes specified action, slices or merges all of others)
Redo
Clear
Property:
Indexes: TArray
TSizeCtrlIndexShift = (szcsSlice, szcsMerge) //if the method is Slice, the discarded action will be just like a step back to the previous state, in case of Merging - it will be offsetted by calculation of all next steps
including the discarding step's Initial Positions.
TSizeCtrlIndexType = (eMoveLeft, eMoveTop, eMoveRight, eMoveDown,
eMoveLeftTop, eMoveLeftDown, eMoveRightTop, eMoveRightDown,
eResizeLeft, eResizeTop, eResizeRight, eResizeBottom,
eResizeLeftTop, eResizeLeftBottom, eResizeRightTop, eResizeRightBottom);
TSizeCtrlHistoryIndex = record
IsMove: boolean;
EditType: TSizeCtrlIndexType read GetType;//(compares original and destination(result,final) properties to give the correct result)
DX, DY, DW, DH: integer; //
X, Y, W, H: integer;// can be realized as virtual, by getting previous index from parent TSizeCtrlHistory<?+->