nsIControllerCommandTable

nsIControllerCommandTable

An interface via which a controller can maintain a series of commands,
and efficiently dispatch commands to their respective handlers.

Controllers that use an nsIControllerCommandTable should support
nsIInterfaceRequestor, and be able to return an interface to their
controller command table via getInterface().

Methods

makeImmutable()

Make this command table immutable, so that commands cannot
be registered or unregistered. Some command tables are made
mutable after command registration so that they can be
used as singletons.

registerCommand(aCommandName, aCommand)

Register and unregister commands with the command table.

Parameters

aCommandName the name of the command under which to register or unregister the given command handler.
aCommand the handler for this command.

unregisterCommand(aCommandName, aCommand)

findCommandHandler(aCommandName)

Find the command handler which has been registered to handle the named command.

Parameters

aCommandName the name of the command to find the handler for.

isCommandEnabled(aCommandName, aCommandRefCon)

Get whether the named command is enabled.

Parameters

aCommandName the name of the command to test
aCommandRefCon the command context data

updateCommandState(aCommandName, aCommandRefCon)

Tell the command to update its state (if it is a state updating command)

Parameters

aCommandName the name of the command to update
aCommandRefCon the command context data

supportsCommand(aCommandName, aCommandRefCon)

Get whether the named command is supported.

Parameters

aCommandName the name of the command to test
aCommandRefCon the command context data

doCommand(aCommandName, aCommandRefCon)

Execute the named command.

Parameters

aCommandName the name of the command to execute
aCommandRefCon the command context data

doCommandParams(aCommandName, aParam, aCommandRefCon)

getCommandState(aCommandName, aParam, aCommandRefCon)