CommandManager Prototype

Manages commands, with accelerator keys, help text and argument processing.

Syntax

var object = new CommandManager(defaultBundle);

Arguments

ArgumentSummary
defaultBundle An nsIStringBundle object to load command parameters, labels a help text from.

Remarks

You should never need to create an instance of this prototype; access the command manager through client.commandManager.

Members

MemberSummary
addCommandInternal. Use defineCommand.
addHook Registers a hook for a particular command.
addHooks Registers multiple hooks for commands.
defineCommand Adds a single command.
defineCommands Adds multiple commands in a single call.
installKeyInternal. Installs the accelerator key for a single command.
installKeysInternal. Installs accelerator keys for commands into an existing document.
isCommandSatisfied
list Gets a sorted Array of CommandRecord objects which match.
listNames Gets a sorted Array of command names which match.
parseArgument
parseArguments
parseArgumentsRaw
removeCommand Removes a single command.
removeCommands Removes multiple commands in a single call.
removeHook Unregisters a hook for a particular command.
removeHooks Unregisters multiple hooks for commands.
uninstallKeyInternal. Uninstalls the accelerator key for a single command.
uninstallKeysInternal. Uninstalls accelerator keys for commands from a document.

See Also

Source Code

function CommandManager(defaultBundle)
{
this.commands = new Object();
this.commandHistory = new Object();
this.defaultBundle = defaultBundle;
this.currentDispatchDepth = 0;
this.maxDispatchDepth = 10;
this.dispatchUnwinding = false;
}