Class Fox::FXCommand

In: | ../lib/fox/undolist.rb
Parent: | Object

FXCommand is an "abstract" base class for your application’s commands. At a minimum, your concrete subclasses of FXCommand should implement the undo, redo, undoName, and redoName methods.

Methods

redo redoName size undo undoName

Public Instance methods

undo()

Undo this command; this should save enough information for a subsequent redo.

redo()

Redo this command; this should save enough information for a subsequent undo.

undoName()

Name of the undo command to be shown on a button or menu command; for example, "Undo Delete".

redoName()

Name of the redo command to be shown on a button or menu command; for example, "Redo Delete".

size()

Returns the size of the information in the undo record, i.e. the number of bytes required to store it in memory. This is only used by the FXUndoList#trimSize method, which can be called to reduce the memory use of the undo list to a certain size.