pyface.undo.action.command_action module

class pyface.undo.action.command_action.CommandAction[source]

Bases: Action

The CommandAction class is an Action class that wraps undo/redo commands. It is only useful for commands that do not take any arguments or return any result.

command = Callable()

The command to create when the action is performed.

command_stack = Instance(ICommandStack)

The command stack onto which the command will be pushed when the action is performed.

data = Any()

This is the data on which the command operates.

perform(event)[source]

This is reimplemented to push a new command instance onto the command stack.