sbIPlaylistCommandsBuilder Interface Reference

A helper used to construct sbIPlaylistCommands interfaces. More...

import"sbIPlaylistCommandsBuilder.idl";

Inheritance diagram for sbIPlaylistCommandsBuilder:
[legend]
Collaboration diagram for sbIPlaylistCommandsBuilder:
[legend]

Public Member Functions

void init (in AString aId)
 A required initialization method that sets the id of the sbIPlaylistCommands object. A playlist command must have an id to be registered. More...
 
void appendSubmenu (in AString aParentSubMenuId, in AString aSubMenuId, in AString aLabel, in AString aTooltipText)
 Append a submenu to the set of commands. More...
 
void insertSubmenuBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aSubMenuId, in AString aLabel, in AString aTooltipText)
 Insert a submenu into the set of commands. More...
 
void insertSubmenuAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aSubMenuId, in AString aLabel, in AString aTooltipText)
 Insert a submenu into the set of commands. More...
 
void appendAction (in AString aParentSubMenuId, in AString aActionId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Append an action to the set of commands. More...
 
void insertActionBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aActionId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Insert an action into the set of commands. More...
 
void insertActionAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aActionId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Insert an action into the set of commands. More...
 
void appendSeparator (in AString aParentSubMenuId, in AString aSeparatorId)
 Append a separator to the set of commands. More...
 
void insertSeparatorBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aSeparatorId)
 Insert a separator into the set of commands. More...
 
void insertSeparatorAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aSeparatorId)
 Insert a separator into the set of commands. More...
 
void appendFlag (in AString aParentSubMenuId, in AString aFlagId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback, in sbIPlaylistCommandsBuilderGetBoolCallback aValueCallback)
 Append a flag to the set of commands. More...
 
void insertFlagBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aCommandId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback, in sbIPlaylistCommandsBuilderGetBoolCallback aGetValueCallback)
 Insert a flag into the set of commands. More...
 
void insertFlagAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aCommandId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback, in sbIPlaylistCommandsBuilderGetBoolCallback aGetValueCallback)
 Insert a flag into the set of commands. More...
 
void appendValue (in AString aParentSubMenuId, in AString aValueId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSetValueCallback aSetValueCallback, in sbIPlaylistCommandsBuilderGetStringCallback aGetValueCallback)
 Append a value to the set of commands. More...
 
void insertValueBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aValueId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSetValueCallback aSetValueCallback, in sbIPlaylistCommandsBuilderGetStringCallback aGetValueCallback)
 Insert a value into the set of commands. More...
 
void insertValueAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aValueId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSetValueCallback aSetValueCallback, in sbIPlaylistCommandsBuilderGetStringCallback aGetValueCallback)
 Insert a value into the set of commands. More...
 
void appendChoiceMenu (in AString aParentSubMenuId, in AString aChoiceMenuId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderGetStringCallback aItemCallback)
 Append a choicemenu to the set of commands. More...
 
void insertChoiceMenuBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aChoiceMenuId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderGetStringCallback aItemCallback)
 Insert a choicemenu into the set of commands. More...
 
void insertChoiceMenuAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aChoiceMenuId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderGetStringCallback aItemCallback)
 Insert a choicemenu into the set of commands. More...
 
void appendChoiceMenuItem (in AString aParentSubMenuId, in AString aChoiceMenuItemId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Append a choicemenuitem to the set of commands. More...
 
void insertChoiceMenuItemBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aCommandId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Insert a choicemenuitem into the set of commands. More...
 
void insertChoiceMenuItemAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aCommandId, in AString aLabel, in AString aTooltipText, in sbIPlaylistCommandsBuilderSimpleCallback aTriggerCallback)
 Insert a choicemenuitem into the set of commands. More...
 
void appendCustomItem (in AString aParentSubMenuId, in AString aCustomItemId, in sbIPlaylistCommandsBuilderInstantiationCallback aInstantiationCallback, in sbIPlaylistCommandsBuilderRefreshCallback aRefreshCallback)
 Append a customitem to the set of commands. More...
 
void insertCustomItemBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aCustomItemId, in sbIPlaylistCommandsBuilderInstantiationCallback aInstantiationCallback, in sbIPlaylistCommandsBuilderRefreshCallback aRefreshCallback)
 Insert a customitem into the set of commands. More...
 
void insertCustomItemAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aCustomItemId, in sbIPlaylistCommandsBuilderInstantiationCallback aInstantiationCallback, in sbIPlaylistCommandsBuilderRefreshCallback aRefreshCallback)
 Insert a customitem into the set of commands. More...
 
void appendPlaylistCommands (in AString aParentSubMenuId, in AString aCommandsId, in sbIPlaylistCommands aPlaylistCommands)
 Append an existing set of commands to this set of commands. More...
 
void insertPlaylistCommandsBefore (in AString aParentSubMenuId, in AString aBeforeId, in AString aCommandsId, in sbIPlaylistCommands aPlaylistCommands)
 Insert an existing set of commands into this set of commands. More...
 
void insertPlaylistCommandsAfter (in AString aParentSubMenuId, in AString aAfterId, in AString aCommandsId, in sbIPlaylistCommands aPlaylistCommands)
 Insert an existing set of commands into this set of commands. More...
 
void setCommandShortcut (in AString aParentSubMenuId, in AString aCommandId, in AString aShortcutKey, in AString aShortcutKeyCode, in AString aShortcutModifiers, in PRBool aShortcutIsLocal)
 Assign a keyboard shortcut to a command item. More...
 
void setCommandEnabledCallback (in AString aParentSubMenuId, in AString aCommandId, in sbIPlaylistCommandsBuilderGetBoolCallback aEnabledCallback)
 Assign a callback to a command item to dynamically determine its enabled status. More...
 
void setCommandVisibleCallback (in AString aParentSubMenuId, in AString aCommandId, in sbIPlaylistCommandsBuilderGetBoolCallback aVisibleCallback)
 Assign a callback to a command item to dynamically determine its visible status. More...
 
void setInitCallback (in sbIPlaylistCommandsBuilderPCCallback aInitCallback)
 Assign a callback to the entire command set to perform initialization. More...
 
void setShutdownCallback (in sbIPlaylistCommandsBuilderPCCallback aInitCallback)
 Assign a callback to the entire command set to perform shutdown. More...
 
void setVisibleCallback (in sbIPlaylistCommandsBuilderPCCallback aVisibleCallback)
 Assign a callback to the entire command set to dynamically determine its visible status (affects all commands) More...
 
void removeCommand (in AString aParentSubMenuId, in AString aCommandId)
 Remove a command from the set. More...
 
void removeAllCommands ([optional] in AString aParentSubMenuId)
 Remove all commands from the set. More...
 
void shutdown ()
 Shutdown the builder object, ensure that no external reference remains in its internal arrays. More...
 
- Public Member Functions inherited from sbIPlaylistCommands
void addCommandObject (in sbIPlaylistCommands aCommandObjectAction)
 Adds a command object as a child of this sbIPlaylistCommands object. More...
 
void removeCommandObject (in sbIPlaylistCommands aCommandObject)
 Removes a child command object from this sbIPlaylistCommands object. More...
 
void addListener (in sbIPlaylistCommandsListener aListener)
 Adds a listener to this command object to detect child additions or removals and other changes to the command object. More...
 
void removeListener (in sbIPlaylistCommandsListener aListener)
 Removes a listener from this command object. More...
 
void notifyListeners (in AString aTriggerFunction, in sbIPlaylistCommands aCommandObject)
 Notifies the listeners added to this command object. aTriggerFunction can be onCommandAdded, onCommandRemoved, or onCommandChanged and the param aCommandObject is expected to be the added, removed, or changed sbIPlaylistCommands object. More...
 
PRBool getVisible (in AString aHost)
 Return the visible state for the entire command object. More...
 
void setContext (in sbIPlaylistCommandsContext aContext)
 Be informed when a set of commands are attached to a playlist element. More...
 
PRInt32 getNumCommands (in AString aSubMenu, in AString aHost)
 Return the number of command elements to be displayed. More...
 
AString getCommandType (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the type of the requested command element index. More...
 
AString getCommandId (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the id string for the requested command element index. More...
 
AString getCommandText (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the human readable text for the requested command element index. More...
 
PRInt32 getCommandFlex (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the flex value for the requested command element index. More...
 
AString getCommandToolTipText (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the human readable text for the requested command element's tooltip. More...
 
PRBool getCommandEnabled (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the enabled state for the requested command element index. More...
 
PRBool getCommandVisible (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the visible state for the requested command element index. More...
 
PRBool getCommandFlag (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the value of the flag for the requested command element index. More...
 
AString getCommandValue (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the value of the requested command element index. More...
 
AString getCommandChoiceItem (in AString aChoiceMenu, in AString aHost)
 Return the selected item for choice list of the requested command element index. More...
 
AString getCommandShortcutModifiers (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut modifiers of the requested command element index. More...
 
AString getCommandShortcutKey (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut key of the requested command element index. More...
 
AString getCommandShortcutKeycode (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return the shortcut keycode of the requested command element index. More...
 
PRBool getCommandShortcutLocal (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return a boolean reflecting the local vs window-wide behavior of the shortcut. More...
 
sbIPlaylistCommands getCommandSubObject (in AString aSubMenu, in PRInt32 aIndex, in AString aHost)
 Return an sbIPlaylistCommands secondary object. More...
 
nsISimpleEnumerator getChildrenCommandObjects ()
 Returns all sbIPlaylistCommands that are children of this command object (returns the originals) More...
 
nsIDOMNode instantiateCustomCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMDocument aDocument)
 Instantiate the custom element associated with the requested command. More...
 
void refreshCustomCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aID, in nsIDOMNode aCustomCommandElement)
 Refresh the custom element associated with the requested command. More...
 
void onCommand (in AString aSubMenu, in PRInt32 aIndex, in AString aHost, in AString aId, in AString aValue)
 Handle the fact that a command was activated. More...
 
sbIPlaylistCommands duplicate ()
 Duplicate the command object. More...
 
void initCommands (in AString aHost)
 Initialization function. More...
 
void shutdownCommands ()
 Shutdown function. More...
 

Additional Inherited Members

- Public Attributes inherited from sbIPlaylistCommands
readonly attribute AString id
 An identifier for the command object, unique for each playlist type or guid. Must be set with the init method before a playlist command can be registered. More...
 
attribute PRUint16 targetFlags
 Flags of the form specified in sbIPlaylistCommandsHelper.idl to indicate the current location of this command object. These flags are only set by the functions of sbIPlaylistCommandsHelper currently, so may not be present in sbIPlaylistCommands created and added through other means. If these flags are not present, or equal 0, then the sbIPlaylistCommands object is not informed of its current location. As well, because of issues removing objects with the sbIPlaylistCommandsHelper functions that were not created or added in through that service, these flags can, in that situation, inaccurately report that an object is somewhere that it is actually not present (namely one of the mediaitem context menu or toolbar). These flags will always, however, accurately report where this playlist command is not. More...
 
attribute sbIPlaylistCommands parentCommandObject
 The parent sbIPlaylistCommands of this object. The parentCommandObject is set by sbIPlaylistCommands.addCommandObject and is primarily used to bubble listener notifications up the sbIPlaylistCommands hierarchy. More...
 
readonly attribute
sbIPlaylistCommandsBuilderPCCallback 
visibleCallback
 Return the current visibility callback method that determines where this object will be visible. More...
 

Detailed Description

A helper used to construct sbIPlaylistCommands interfaces.

This interface is meant to be instantiated by user code, ie:

const PlaylistCommandsBuilder = new Components.
Constructor("@songbirdnest.com/Songbird/PlaylistCommandsBuilder;1",
"sbIPlaylistCommandsBuilder");
var builder = new PlaylistCommandsBuilder();

The instance may then be used to create a set of commands, which it exposes to playlist objects, and to service pane nodes. Each of its command may be of several different kinds :

  • Actions are the simplest form of commands, they correspond to toolbar buttons and context menu items, which may be triggered by the user to perform some sort of action, possibly on selected items or playlists.
  • Submenus are meant to hold more commands in a hierarchical manner, they correspond to dropdown buttons (and subsequently submenus) in toolbars, and submenus in context menus.
  • Separators are used to separate commands into visually distinct groups, this translates to flexible spacers in toolbars, and in menu separators in context menus.
  • Flags are user-togglable commands, they can be true or false and otherwise act as actions, they correspond to pushed/popped buttons in toolbars and checked menuitems in context menus.
  • Values are user-changeable string values, they are only applicable to toolbars and appear as edit boxes.
  • Choicemenus act as submenus but are meant to hold choicemenuitems (see below).
  • Choicemenuitems act as flags but are meant to live alongside several other items of their kind, acting as radio items (only one choicemenuitem may be active at a time).
  • Customitems are only applicable to toolbars, they are generic DOM elements which are inserted as is inside the command host.
  • Playlistcommands are fully fledged sbIPlaylistCommands interfaces, which may have been requested from the repository of publicly available published commands from the playlistcommandsmanager service, or they may be interfaces that you have constructed yourself. Inserting sbIPlaylistCommands interface A into sbIPlaylistCommandsBuilder B does not create a submenu in B, all commands in A are displayed at the root of B (unless A itself has submenus, in which case these also appear as submenus in B). Since sbIPlaylistCommandsBuilder implements sbIPlaylistCommands, you may insert an sbIPlaylistCommandsBuilder into another. This is used for instance to expose many single commands to the playlistcommandsmanager and then tie all of these into a single sbIPlaylistCommands grouping without having to duplicate code.

Commands registered to the PlaylistCommandsManager using the registerPlaylistCommandsMedia[List|Item]() functions should be unregistered using the corresponding unregisterPlaylistCommandsMedia[List|Item]() function before application shutdown. Commands published using the publish() function should be withdrawn using the withdraw() function before application shutdown.

All instantiated sbIPlaylistCommandsBuilder should have their shutdown() method called before application shutdown to ensure that no external reference remains in their internal arrays.

Note that text parameters (labels, tooltiptexts) as well as keyboard shortcut strings (key, keycode, modifiers) may take values such as "&value", which will cause the appropriate localized string to be fetched from the active locale.

See Also
sbIPlaylistCommands sbIPlaylistCommandsManager

Definition at line 113 of file sbIPlaylistCommandsBuilder.idl.

Member Function Documentation

void sbIPlaylistCommandsBuilder::appendAction ( in AString  aParentSubMenuId,
in AString  aActionId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Append an action to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aActionIdThe Id of the action to add
aLabelThe label for the action to add
aTooltipTextThe tooltip text for the action to add
aTriggerCallbackThe interface or function to call when this action is triggered
See Also
insertActionBefore, insertActionAfter, sbIPlaylistCommandsBuilderSimpleCallback
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L113
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L153
void sbIPlaylistCommandsBuilder::appendChoiceMenu ( in AString  aParentSubMenuId,
in AString  aChoiceMenuId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderGetStringCallback  aItemCallback 
)

Append a choicemenu to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aChoiceMenuIdThe Id of the choicemenu to add
aLabelThe label for the choicemenu to add
aTooltipTextThe tooltip text for the choicemenu to add
aItemCallbackThe interface or function to call to retrieve the id of the currently selected choice item
See Also
appendChoiceMenu, insertChoiceMenuBefore, insertChoiceMenuAfter
void sbIPlaylistCommandsBuilder::appendChoiceMenuItem ( in AString  aParentSubMenuId,
in AString  aChoiceMenuItemId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Append a choicemenuitem to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aChoiceMenuItemIdThe Id of the choicemenuitem to add
aLabelThe label for the choicemenuitem to add
aTooltipTextThe tooltip text for the choicemenuitem to add
aTriggerCallbackThe interface or function to call when this choicemenuitem is selected
See Also
insertChoiceMenuItemBefore, insertChoiceMenuItemAfter, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::appendCustomItem ( in AString  aParentSubMenuId,
in AString  aCustomItemId,
in sbIPlaylistCommandsBuilderInstantiationCallback  aInstantiationCallback,
in sbIPlaylistCommandsBuilderRefreshCallback  aRefreshCallback 
)

Append a customitem to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCustomItemIdThe Id of the customitem to add
aInstantiationCallbackThe interface or function to call in order to instantiate this customitem
aRefreshCallbackThe interface or function to call when this customitem should be refreshed
See Also
insertCustomItemBefore, insertCustomItemAfter, sbIPlaylistCommandsBuilderSimpleCallback, sbIPlaylistCommandsBuilderInstantiationCallback
void sbIPlaylistCommandsBuilder::appendFlag ( in AString  aParentSubMenuId,
in AString  aFlagId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback,
in sbIPlaylistCommandsBuilderGetBoolCallback  aValueCallback 
)

Append a flag to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aFlagIdThe Id of the flag to add
aLabelThe label for the flag to add
aTooltipTextThe tooltip text for the flag to add
aTriggerCallbackThe interface or function to call when this flag is flipped
aValueCallbackThe interface or function to call to retrieve the flag's value
See Also
insertFlagBefore, insertFlagAfter, sbIPlaylistCommandsBuilderGetBoolCallback, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::appendPlaylistCommands ( in AString  aParentSubMenuId,
in AString  aCommandsId,
in sbIPlaylistCommands  aPlaylistCommands 
)

Append an existing set of commands to this set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCommandsIdThe Id of the playlistcommands item to add
aPlaylistCommandsThe sbIPlaylistCommands interface to add
See Also
insertPlaylistCommandsBefore, insertPlaylistCommandsAfter
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L562
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L130
void sbIPlaylistCommandsBuilder::appendSeparator ( in AString  aParentSubMenuId,
in AString  aSeparatorId 
)
void sbIPlaylistCommandsBuilder::appendSubmenu ( in AString  aParentSubMenuId,
in AString  aSubMenuId,
in AString  aLabel,
in AString  aTooltipText 
)

Append a submenu to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aSubMenuIdThe Id of the submenu to add
aLabelThe label for the submenu to add
aTooltipTextThe tooltip text for the submenu to add
See Also
insertSubmenuBefore, insertSubmenuAfter
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L140
void sbIPlaylistCommandsBuilder::appendValue ( in AString  aParentSubMenuId,
in AString  aValueId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSetValueCallback  aSetValueCallback,
in sbIPlaylistCommandsBuilderGetStringCallback  aGetValueCallback 
)

Append a value to the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aValueIdThe Id of the value to add
aLabelThe label for the value to add
aTooltipTextThe tooltip text for the value to add
aSetValueCallbackThe interface or function to call when this value is changed
aValueCallbackThe interface or function to call to retrieve the value
See Also
insertValueBefore, insertValueAfter, sbIPlaylistCommandsBuilderGetStringCallback, sbIPlaylistCommandsBuilderSetValueCallback
void sbIPlaylistCommandsBuilder::init ( in AString  aId)

A required initialization method that sets the id of the sbIPlaylistCommands object. A playlist command must have an id to be registered.

Parameters
aIdThe id to set for this sbIPlaylistCommands object
void sbIPlaylistCommandsBuilder::insertActionAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aActionId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Insert an action into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this action is to be added
aActionIdThe Id of the action to add
aLabelThe label for the action to add
aTooltipTextThe tooltip text for the action to add
aTriggerCallbackThe interface or function to call when this action is triggered
See Also
appendAction, insertActionBefore, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertActionBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aActionId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Insert an action into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this action is to be added
aActionIdThe Id of the action to add
aLabelThe label for the action to add
aTooltipTextThe tooltip text for the action to add
aTriggerCallbackThe interface or function to call when this action is triggered
See Also
appendAction, insertActionAfter, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertChoiceMenuAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aChoiceMenuId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderGetStringCallback  aItemCallback 
)

Insert a choicemenu into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this choicemenu is to be added
aChoiceMenuIdThe Id of the choicemenu to add
aLabelThe label for the choicemenu to add
aTooltipTextThe tooltip text for the choicemenu to add
aItemCallbackThe interface or function to call to retrieve the id of the currently selected choice item
See Also
appendChoiceMenu, insertChoiceMenuBefore
void sbIPlaylistCommandsBuilder::insertChoiceMenuBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aChoiceMenuId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderGetStringCallback  aItemCallback 
)

Insert a choicemenu into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this choicemenu is to be added
aChoiceMenuIdThe Id of the choicemenu to add
aLabelThe label for the choicemenu to add
aTooltipTextThe tooltip text for the choicemenu to add
aItemCallbackThe interface or function to call to retrieve the id of the currently selected choice item
See Also
appendChoiceMenu, insertChoiceMenuAfter
void sbIPlaylistCommandsBuilder::insertChoiceMenuItemAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aCommandId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Insert a choicemenuitem into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this choicemenuitem is to be added
aChoiceMenuItemIdThe Id of the choicemenuitem to add
aLabelThe label for the choicemenuitem to add
aTooltipTextThe tooltip text for the choicemenuitem to add
aTriggerCallbackThe interface or function to call when this choicemenuitem is selected
See Also
appendChoiceMenuItem, insertChoiceMenuItemBefore, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertChoiceMenuItemBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aCommandId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback 
)

Insert a choicemenuitem into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this choicemenuitem is to be added
aChoiceMenuItemIdThe Id of the choicemenuitem to add
aLabelThe label for the choicemenuitem to add
aTooltipTextThe tooltip text for the choicemenuitem to add
aTriggerCallbackThe interface or function to call when this choicemenuitem is selected
See Also
appendChoiceMenuItem, insertChoiceMenuItemAfter, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertCustomItemAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aCustomItemId,
in sbIPlaylistCommandsBuilderInstantiationCallback  aInstantiationCallback,
in sbIPlaylistCommandsBuilderRefreshCallback  aRefreshCallback 
)

Insert a customitem into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this customitem is to be added
aCustomItemIdThe Id of the customitem to add
aInstantiationCallbackThe interface or function to call in order to instantiate this customitem
aRefreshCallbackThe interface or function to call when this customitem should be refreshed
See Also
appendCustomItem, insertCustomItemBefore, sbIPlaylistCommandsBuilderSimpleCallback, sbIPlaylistCommandsBuilderInstantiationCallback
void sbIPlaylistCommandsBuilder::insertCustomItemBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aCustomItemId,
in sbIPlaylistCommandsBuilderInstantiationCallback  aInstantiationCallback,
in sbIPlaylistCommandsBuilderRefreshCallback  aRefreshCallback 
)

Insert a customitem into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this customitem is to be added
aCustomItemIdThe Id of the customitem to add
aInstantiationCallbackThe interface or function to call in order to instantiate this customitem
aRefreshCallbackThe interface or function to call when this customitem should be refreshed
See Also
appendCustomItem, insertCustomItemAfter, sbIPlaylistCommandsBuilderSimpleCallback, sbIPlaylistCommandsBuilderInstantiationCallback
void sbIPlaylistCommandsBuilder::insertFlagAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aCommandId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback,
in sbIPlaylistCommandsBuilderGetBoolCallback  aGetValueCallback 
)

Insert a flag into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this flag is to be added
aFlagIdThe Id of the flag to add
aLabelThe label for the flag to add
aTooltipTextThe tooltip text for the flag to add
aTriggerCallbackThe interface or function to call when this flag is flipped
aValueCallbackThe interface or function to call to retrieve the flag's value
See Also
appendFlag, insertFlagBefore, sbIPlaylistCommandsBuilderGetBoolCallback, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertFlagBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aCommandId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSimpleCallback  aTriggerCallback,
in sbIPlaylistCommandsBuilderGetBoolCallback  aGetValueCallback 
)

Insert a flag into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this flag is to be added
aFlagIdThe Id of the flag to add
aLabelThe label for the flag to add
aTooltipTextThe tooltip text for the flag to add
aTriggerCallbackThe interface or function to call when this flag is flipped
aValueCallbackThe interface or function to call to retrieve the flag's value
See Also
appendFlag, insertFlagAfter, sbIPlaylistCommandsBuilderGetBoolCallback, sbIPlaylistCommandsBuilderSimpleCallback
void sbIPlaylistCommandsBuilder::insertPlaylistCommandsAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aCommandsId,
in sbIPlaylistCommands  aPlaylistCommands 
)

Insert an existing set of commands into this set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this playlistcommands item is to be added
aCommandsIdThe Id of the playlistcommands item to add
aPlaylistCommandsThe sbIPlaylistCommands interface to add
See Also
appendPlaylistCommands, insertPlaylistCommandsBefore
void sbIPlaylistCommandsBuilder::insertPlaylistCommandsBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aCommandsId,
in sbIPlaylistCommands  aPlaylistCommands 
)

Insert an existing set of commands into this set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this playlistcommands item is to be added
aCommandsIdThe Id of the playlistcommands item to add
aPlaylistCommandsThe sbIPlaylistCommands interface to add
See Also
appendPlaylistCommands, insertPlaylistCommandsAfter
void sbIPlaylistCommandsBuilder::insertSeparatorAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aSeparatorId 
)

Insert a separator into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this separator is to be added
aSeparatorIdThe Id of the separator to add
See Also
appendSeparator, insertSeparatorBefore
void sbIPlaylistCommandsBuilder::insertSeparatorBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aSeparatorId 
)

Insert a separator into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this separator is to be added
aSeparatorIdThe Id of the separator to add
See Also
appendSeparator, insertSeparatorAfter
void sbIPlaylistCommandsBuilder::insertSubmenuAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aSubMenuId,
in AString  aLabel,
in AString  aTooltipText 
)

Insert a submenu into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this submenu is to be added
aSubMenuIdThe Id of the submenu to add
aLabelThe label for the submenu to add
aTooltipTextThe tooltip text for the submenu to add
See Also
appendSubmenu, insertSubmenuBefore
void sbIPlaylistCommandsBuilder::insertSubmenuBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aSubMenuId,
in AString  aLabel,
in AString  aTooltipText 
)

Insert a submenu into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this submenu is to be added
aSubMenuIdThe Id of the submenu to add
aLabelThe label for the submenu to add
aTooltipTextThe tooltip text for the submenu to add
See Also
appendSubmenu, insertSubmenuAfter
void sbIPlaylistCommandsBuilder::insertValueAfter ( in AString  aParentSubMenuId,
in AString  aAfterId,
in AString  aValueId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSetValueCallback  aSetValueCallback,
in sbIPlaylistCommandsBuilderGetStringCallback  aGetValueCallback 
)

Insert a value into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aAfterIdThe Id of the command after which this value is to be added
aValueIdThe Id of the value to add
aLabelThe label for the value to add
aTooltipTextThe tooltip text for the value to add
aSetValueCallbackThe interface or function to call when this value is changed
aValueCallbackThe interface or function to call to retrieve the value
See Also
appendValue, insertValueBefore, sbIPlaylistCommandsBuilderGetStringCallback, sbIPlaylistCommandsBuilderSetValueCallback
void sbIPlaylistCommandsBuilder::insertValueBefore ( in AString  aParentSubMenuId,
in AString  aBeforeId,
in AString  aValueId,
in AString  aLabel,
in AString  aTooltipText,
in sbIPlaylistCommandsBuilderSetValueCallback  aSetValueCallback,
in sbIPlaylistCommandsBuilderGetStringCallback  aGetValueCallback 
)

Insert a value into the set of commands.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aBeforeIdThe Id of the command before which this value is to be added
aValueIdThe Id of the value to add
aLabelThe label for the value to add
aTooltipTextThe tooltip text for the value to add
aSetValueCallbackThe interface or function to call when this value is changed
aValueCallbackThe interface or function to call to retrieve the value
See Also
appendValue, insertValueAfter, sbIPlaylistCommandsBuilderGetStringCallback, sbIPlaylistCommandsBuilderSetValueCallback
void sbIPlaylistCommandsBuilder::removeAllCommands ( [optional] in AString  aParentSubMenuId)

Remove all commands from the set.

Parameters
aParentSubMenuIdAn optional menu id whose commands (and submenus) should be removed. Without this parameter, all commands and submenus are removed.
See Also
removeCommand
void sbIPlaylistCommandsBuilder::removeCommand ( in AString  aParentSubMenuId,
in AString  aCommandId 
)

Remove a command from the set.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCommandIdThe Id of the command item to remove
See Also
removeAllCommands
void sbIPlaylistCommandsBuilder::setCommandEnabledCallback ( in AString  aParentSubMenuId,
in AString  aCommandId,
in sbIPlaylistCommandsBuilderGetBoolCallback  aEnabledCallback 
)

Assign a callback to a command item to dynamically determine its enabled status.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCommandIdThe Id of the command item for which to set the callback
aEnabledCallbackAn interface or function to call to determine the command item's enabled status
See Also
setCommandVisibleCallback, sbIPlaylistCommandsBuilderGetBoolCallback
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L166
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L121
void sbIPlaylistCommandsBuilder::setCommandShortcut ( in AString  aParentSubMenuId,
in AString  aCommandId,
in AString  aShortcutKey,
in AString  aShortcutKeyCode,
in AString  aShortcutModifiers,
in PRBool  aShortcutIsLocal 
)

Assign a keyboard shortcut to a command item.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCommandIdThe Id of the command item for which to set a keyboard shortcut
aShortcutKeyThe keyboard shortcut key
aShortcutKeyCodeThe keyboard shortcut keycode
aShortcutModifiersThe keyboard shortcut modifiers
aShortcutIsLocalWhether this keyboard shortcut acts at the level of the command object only, rather than at the level of the entire window
See Also
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L159
void sbIPlaylistCommandsBuilder::setCommandVisibleCallback ( in AString  aParentSubMenuId,
in AString  aCommandId,
in sbIPlaylistCommandsBuilderGetBoolCallback  aVisibleCallback 
)

Assign a callback to a command item to dynamically determine its visible status.

Parameters
aParentSubMenuIdThe Id of the parent submenu
aCommandIdThe Id of the command item for which to set the callback
aVisibleCallbackAn interface or function to call to determine the command item's visible status
See Also
setCommandEnabledCallback, setVisibleCallback, sbIPlaylistCommandsBuilderGetBoolCallback
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L184
void sbIPlaylistCommandsBuilder::setInitCallback ( in sbIPlaylistCommandsBuilderPCCallback  aInitCallback)

Assign a callback to the entire command set to perform initialization.

Parameters
aInitCallbackAn interface or function to call to perform initialization
See Also
sbIPlaylistCommandsBuilderPCCallback
void sbIPlaylistCommandsBuilder::setShutdownCallback ( in sbIPlaylistCommandsBuilderPCCallback  aInitCallback)

Assign a callback to the entire command set to perform shutdown.

Parameters
aInitCallbackAn interface or function to call to perform shutdown
See Also
sbIPlaylistCommandsBuilderPCCallback
void sbIPlaylistCommandsBuilder::setVisibleCallback ( in sbIPlaylistCommandsBuilderPCCallback  aVisibleCallback)

Assign a callback to the entire command set to dynamically determine its visible status (affects all commands)

Parameters
aVisibleCallbackAn interface or function to call to determine the command set's visible status
See Also
setCommandVisibleCallback, sbIPlaylistCommandsBuilderPCCallback
http://publicsvn.songbirdnest.com/browser/trunk/components/playlistcommands/src/sbPublicPlaylistCommands.js#L581
void sbIPlaylistCommandsBuilder::shutdown ( )

Shutdown the builder object, ensure that no external reference remains in its internal arrays.

See Also
http://publicsvn.songbirdnest.com/browser/extensions/commandsexample/chrome/content/scripts/CommandsExample.js#L200

The documentation for this interface was generated from the following file: