nsISupports
Last changed in Gecko 1.9 (Firefox 3)This interface is used to manage instances of the nsIController interface. Windows and text inputs have default controllers that allow commands such as cmd_copy to act on the focused element or window. XUL elements can also have controllers, although they do not have any default controllers.
Implemented by: @mozilla.org/xul/xul-controllers;1. You should not normally need to create an instance, as you normally need to alter the window or element's existing list of controllers. To create an instance, use:
var controllers = Components.classes["@mozilla.org/xul/xul-controllers;1"]
.createInstance(Components.interfaces.nsIControllers);
void appendController(in nsIController controller); |
nsIController getControllerAt(in unsigned long index); |
nsIController getControllerById(in unsigned long controllerID); |
unsigned long getControllerCount(); |
nsIController getControllerForCommand(in string command); |
unsigned long getControllerId(in nsIController controller); |
void insertControllerAt(in unsigned long index, in nsIController controller); |
void removeController(in nsIController controller); |
nsIController removeControllerAt(in unsigned long index); |
| Attribute | Type | Description |
commandDispatcher | | Obsolete since Gecko 1.9 |
Adds a controller to the end of the list.
void appendController( in nsIController controller );
controllerNS_ERROR_OUT_OF_MEMORYReturns the controller instance at the given position.
nsIController getControllerAt( in unsigned long index );
indexThe controller at the given position.
NS_ERROR_FAILUREReturns a controller given by its order, rather than position, of insertion.
nsIController getControllerById( in unsigned long controllerID );
controllerIDThe controller element that was inserted with that ID.
NS_ERROR_FAILUREReturns the current number of controllers.
unsigned long getControllerCount();
None.
The number of controllers currently in the list of controllers.
Searches for a controller that supports the given command.
nsIController getControllerForCommand( in string command );
commandcmd_copyThe first controller in the list that supports the given command.
Returns the order of insertion of a controller.
unsigned long getControllerId( in nsIController controller );
controllerThe ID in which the controller was inserted.
NS_ERROR_FAILUREInserts a controller at a specific position in the list of controllers. If the position is out of range, nothing happens.
void insertControllerAt( in unsigned long index, in nsIController controller );
indexcontrollerNS_ERROR_OUT_OF_MEMORYRemoves a controller from the list of controllers.
void removeController( in nsIController controller );
controllerNS_ERROR_FAILURERemoves a controller from the list of controllers.
nsIController removeControllerAt( in unsigned long index );
indexThe controller that was removed.
NS_ERROR_FAILURE