WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIControllerCommand

IID:0eae9a46-1dd2-11b2-aca0-9176f05fe9db
Inherits From:nsISupports

A generic command interface. You can register an nsIControllerCommand with the nsIControllerCommandTable.


Methods

void doCommand ( char* commandName , nsISupports commandContext ) void doCommandParams ( char* commandName , nsICommandParams params , nsISupports commandContext ) void getCommandStateParams ( char* commandName , nsICommandParams params , nsISupports commandContext ) PRBool isCommandEnabled ( char* commandName , nsISupports commandContext )

void doCommand ( char* commandName , nsISupports commandContext )

Execute the name command.

Arguments:
commandName: the name of the command to execute.
commandContext: a cookie held by the nsIControllerCommandTable, allowing the command to get some context information. The contents of this cookie are implementation-defined.

void doCommandParams ( char* commandName , nsICommandParams params , nsISupports commandContext )

Arguments:
commandName
params
commandContext

void getCommandStateParams ( char* commandName , nsICommandParams params , nsISupports commandContext )

Arguments:
commandName
params
commandContext

PRBool isCommandEnabled ( char* commandName , nsISupports commandContext )

Returns true if the command is currently enabled. An nsIControllerCommand can implement more than one commands; say, a group of related commands (e.g. delete left/delete right). Because of this, the command name is passed to each method.

Arguments:
commandName: the name of the command for which we want the enabled state.
commandContext: a cookie held by the nsIControllerCommandTable, allowing the command to get some context information. The contents of this cookie are implementation-defined.

References

This interface is passed as an argument to the following methods:

nsIControllerCommandTable.registerCommand, nsIControllerCommandTable.unregisterCommand

This interface is returned from the following methods:

nsIControllerCommandTable.findCommandHandler

Reference documentation is generated from Mozilla's source.