Unit Undo

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

This unit contains the base classes for a command pattern-based undo Stack.

Author : Published in The Delphi Magazine

Modified by

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EHiddenProc EHiddenProc is called when an inherited method of TList is called that should never be called.
Class TUndoItem TUndoItem is an abstract interface for a command. Descendants define what the command does and how to undo and redo the command.
Class TUndoStack TUndoStack is used to manage the TUndoItems.

Functions and Procedures

procedure DisableUndoMenus(UndoItem, RedoItem: TMenuItem);
procedure DisableUndoActions(UndoAction, RedoAction: TAction);
procedure DisableUndoToolButtons(UndoButton, RedoButton: TToolButton);

Types

TStackStatus = (...);

Constants

sUndoDescr = 'Undo last action';
sShortUndoDescr = 'Undo last';
sRedoDescr = 'Redo last action';
sShortRedoDescr = 'Redo last';
sUndoMenu = '&Undo';
sRedoMenu = '&Redo';
sNoUndoDescr = 'Command not available; nothing to undo.';
sNoRedoDescr = 'Command not available; nothing to redo.';
sStackFull = 'Undo Stack is full; only the last %d actions can be undone';

Description

Functions and Procedures

procedure DisableUndoMenus(UndoItem, RedoItem: TMenuItem);

DisableUndoMenus disables UndoItem and RedoItem.

procedure DisableUndoActions(UndoAction, RedoAction: TAction);

DisableUndoActions disables UndoAction and RedoAction.

procedure DisableUndoToolButtons(UndoButton, RedoButton: TToolButton);

DisableUndoToolButtons disables UndoButton and RedoButton.

Types

TStackStatus = (...);

TStackStatus specifies whether the stack is full or not.

Values
  • ssFull:  
  • ssNotFull:  

Constants

sUndoDescr = 'Undo last action';

Use const for version 9.0 and earlier. Otherwise, use resourcestring.

sShortUndoDescr = 'Undo last';
 
sRedoDescr = 'Redo last action';
 
sShortRedoDescr = 'Redo last';
 
sUndoMenu = '&Undo';
 
sRedoMenu = '&Redo';
 
sNoUndoDescr = 'Command not available; nothing to undo.';
 
sNoRedoDescr = 'Command not available; nothing to redo.';
 
sStackFull = 'Undo Stack is full; only the last %d actions can be undone';
 

Authors


Generated by PasDoc 0.12.1 on 2013-05-13 15:42:06