thanks everyone
so basically i can create something called "command", e.g. cut, copy, paste
and store the commands that the user has performed
and each command itself knows how to undo
so, e.g. if the user cut a section of text
a CutCommand (inherit from Command) is created and the text is stored in the
CutCommand
and the CutCommand itself is store on a Undo stack
when user choose undo, we retrive the command from the top of the stack and
ask it to redo
in this case, as the CutCommand stored the text that was cut, so i can paste
back the text
thank!