Unit cUndoRedo

** Created August 11, 1996 ** by calix@together.net ** ** Comments are strongly encouraged. ** ** This component is my attempt at multi-level Undo/Redo. ** The registered component, TUndoRedo, keeps tracks of ** components derived from TUndoRedoWorker. ** ** ** Before any Undo/Redo can happen you must, ** ** 1. define Undo/Redo Action Constants (UDO_SOMEUNDOABLEACTION), ** ** 2. derive 'Workers' from TUndoRedoWorker for that action, ** ** 3. declare an OnAction event handler to link the constant ** with the action in a case statement. ** ** ** This idea came from Dr. Dobb's February 1996 aricle on ** "Implementing Multilevel Undo/Redo" ** ** 9/5/96 - Added OnClear, OnUndoAction, OnRedoAction events

Classes

TStack - -------------------------------------------------------
TUndoRedo - -------------------------------------------------------
TUndoRedoWorker - -------------------------------------------------------

Functions

Register - -------------------------------------------------------

Types

TCreateEvent

Constants

Variables


Functions


procedure Register;

-------------------------------------------------------

Types


TCreateEvent = procedure(var Worker: TUndoRedoWorker; Value: LongInt) of object

Constants


Variables