CommandManager Prototype
Manages commands, with accelerator keys, help text and argument processing.
Syntax
var object = new CommandManager(defaultBundle);
Arguments
| Argument | Summary |
|---|---|
| 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
| Member | Summary |
|---|---|
| addCommand | Internal. 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. |
| installKey | Internal. Installs the accelerator key for a single command. |
| installKeys | Internal. 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. |
| uninstallKey | Internal. Uninstalls the accelerator key for a single command. |
| uninstallKeys | Internal. 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;
}