nsIControllerCommandTable
| IID: | d1a47834-6ad4-11d7-bfad-000393636592 |
| Inherits From: | nsISupports |
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().
This interface is implemented by the following components:
Methods
void doCommand ( char* commandName , nsISupports commandRefCon )
void doCommandParams ( char* commandName , nsICommandParams param , nsISupports commandRefCon )
nsIControllerCommand findCommandHandler ( char* commandName )
void getCommandState ( char* commandName , nsICommandParams param , nsISupports commandRefCon )
PRBool isCommandEnabled ( char* commandName , nsISupports commandRefCon )
void makeImmutable ( )
void registerCommand ( char* commandName , nsIControllerCommand command )
PRBool supportsCommand ( char* commandName , nsISupports commandRefCon )
void unregisterCommand ( char* commandName , nsIControllerCommand command )
void updateCommandState ( char* commandName , nsISupports commandRefCon )
void doCommand ( char* commandName , nsISupports commandRefCon )
Execute the named command.
- Arguments:
- commandName: the name of the command to execute
- commandRefCon: the command context data
void doCommandParams ( char* commandName , nsICommandParams param , nsISupports commandRefCon )
- Arguments:
- commandName
- param
- commandRefCon
nsIControllerCommand findCommandHandler ( char* commandName )
Find the command handler which has been registered to handle the named command.
- Arguments:
- commandName: the name of the command to find the handler for.
void getCommandState ( char* commandName , nsICommandParams param , nsISupports commandRefCon )
- Arguments:
- commandName
- param
- commandRefCon
PRBool isCommandEnabled ( char* commandName , nsISupports commandRefCon )
Get whether the named command is enabled.
- Arguments:
- commandName: the name of the command to test
- commandRefCon: the command context data
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.
void registerCommand ( char* commandName , nsIControllerCommand command )
Register and unregister commands with the command table.
- Arguments:
- commandName: the name of the command under which to register or unregister the given command handler.
- command: the handler for this command.
PRBool supportsCommand ( char* commandName , nsISupports commandRefCon )
Get whether the named command is supported.
- Arguments:
- commandName: the name of the command to test
- commandRefCon: the command context data
void unregisterCommand ( char* commandName , nsIControllerCommand command )
- Arguments:
- commandName
- command
void updateCommandState ( char* commandName , nsISupports commandRefCon )
Tell the command to update its state (if it is a state updating command)
- Arguments:
- commandName: the name of the command to update
- commandRefCon: the command context data
References
This interface is passed as an argument to the following methods:
Reference documentation is generated from Mozilla's source.
