TheBigUndo_CustomUndo
Protected Interface TheBigUndo_CustomUndo
Description
The CustomUndo interface can be implemented by any control or window.
This interface overrides the default checking and undo implementation.
CustomUndo is mostly intended for controls that do not have standardized data (ie. Listboxes)
This could also be useful for custom controls such as a color chooser or a drawing control.

1) Add CustomUndo to the control or window's interfaces.

2) CustomUndo_GetCurrentState should return a dictionary representing the current state of the control or window.
This will be a dictionary with any number of key/value pairs representing any arbitrary data including pictures.

3) CustomUndo_CheckForStateChange will be passed the most recent state object to be compared with the current state.
if the state has changed return a dictionary describing the change(s), otherwise return nil.
Include an "Undo Type" key with a label to be shown in the UndoMenuItem and RedoMenuItem if you like.

4) CustomUndo_SetCurrentState will be passed the last Dictionary returned by CustomUndo_CheckForStateChange when the user
selects "Undo" from the edit menu.

5) After the undo has been executed, CustomUndo_CheckForStateChange will be called again to obtain the redo dictionary.
if redo is impossible, return nil.

When using this module with controls that use large data, such as an image editor, either only the changed
portion of the image should be returned or the undo levels should be limited to a reasonable amount by setting
control.MaximumUndos
Methods
CustomUndo_CheckForStateChange
Allows creation of a dictionary describing changes in state. Return nil if no changes were found.
CustomUndo_GetCurrentState
Should return a dictionary desribing the current state of the implementor.
CustomUndo_SetCurrentState
Called when an undo or redo is invoked. StateDictionary is the dictionary returned from CheckForStat