Custom Undo

I need create some Undo list for use along the time.

Ex:

The (undo event) return for the begining of last command used and undo the last command, this is the rhino behavior.

So, I need every time I want press a button on my plugin save the undo state at this time, with this create a list (sort of backup) to at any time define the point where I want to restore my drawing

Something like this:

Any solution?

Thanks