Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Editing History #20

Open
ghost opened this issue Jun 3, 2019 · 0 comments
Open

Add Editing History #20

ghost opened this issue Jun 3, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@ghost
Copy link

ghost commented Jun 3, 2019

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<?+->

@ghost ghost added enhancement New feature or request good first issue Good for newcomers labels Jun 3, 2019
@ghost ghost added this to the v8.6 milestone Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

0 participants