Interface nsIControllerCommandTableType

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().

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Execute the named command.

    Parameters

    • aCommandName: string

      the name of the command to execute

    • aCommandRefCon: nsISupports

      the command context data

    Returns void

  • Parameters

    • aCommandName: string
    • aParam: nsICommandParams
    • aCommandRefCon: nsISupports

    Returns void

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

    Parameters

    • aCommandName: string

      the name of the command to find the handler for.

    Returns nsIControllerCommand

  • Parameters

    • aCommandName: string
    • aParam: nsICommandParams
    • aCommandRefCon: nsISupports

    Returns void

  • Get whether the named command is enabled.

    Parameters

    • aCommandName: string

      the name of the command to test

    • aCommandRefCon: nsISupports

      the command context data

    Returns boolean

  • 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.

    Returns void

  • Register and unregister commands with the command table.

    Parameters

    • aCommandName: string

      the name of the command under which to register or unregister the given command handler.

    • aCommand: nsIControllerCommand

      the handler for this command.

    Returns void

  • Get whether the named command is supported.

    Parameters

    • aCommandName: string

      the name of the command to test

    • aCommandRefCon: nsISupports

      the command context data

    Returns boolean

  • Parameters

    • aCommandName: string
    • aCommand: nsIControllerCommand

    Returns void

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

    Parameters

    • aCommandName: string

      the name of the command to update

    • aCommandRefCon: nsISupports

      the command context data

    Returns void

Generated using TypeDoc