User Tools

Site Tools


developer_center:recipe_book:extensions_and_core:playlist_buttons_aka_playlist_commands:playlist_command_types

Playlist Command Types

Commands can be 1 of 7 types:

  1. Actions
  2. Flags
  3. Values
  4. Choice Menus
  5. Separators
  6. Submenus
  7. Custom
  1. Actions
    • Actions represent buttons and are defined by an id, label, tooltip text, and callback. The label is the user-facing text for the button, while the tooltip text does not appear anywhere as of Nightingale 1.12.1 so it is often disregarded.
  2. Flags
    • Flags can best represent binary toggles. In the mediaitem and servicepane context menus this is reflected by a checkmark next to the flag if it is 'on' while in the toolbar this is demonstrated with a punched-in button. Flags are defined by an id, user-facing label, unused tooltip text, a trigger callback, and a bool callback. The trigger callback is called every time that a user clicks on the flag, while the bool callback is used to determine if the flag is 'on'.
  3. Values
    • Values are user changeable string values represented by a text input box. Values can only appear in the toolbar and are defined by an id, label, unused tooltip, a setValue callback anda getString callback. The setValue callback is passed the value enterred into the input box while the getString callback returns the string to be displayed in the input box.
  4. Choice Menus
    • Choice menus represent a list of items grouped together in a menu with one of those items selected. Choice menus have two pieces with the parent 'Choice Menu' and under that Choice Menu a series of 'Choice Menu Items'. The Choice Menu is defined by an id, label, unused tooltip, and a callback to determine which Choice Menu Item should be displayed as selected. Choice Menu Items are defined by an id, label, unused tooltip, and a trigger callback for when that item is clicked.
  5. Separators
    • Separators are used to separate playlist commands with a bar. They are defined by an id.
  6. Submenus
    • Submenus are playlist commands that contain other playlst commands as a sublist. Submenus are defined by an id which is used to target playlist commands under that specific submenu, a label, and an unusued tooltip.
  7. Custom
    • Custom playlist commands are the most flexible playlist command. They are only applicable to toolbars, and they represent a generic DOM element. Custom playlist commands are defined by an id, instantiation callback, and a refresh callback. The instantiation callback returns the nsIDOMNode to be displayed, while the refresh callback is passed the dom node to keep the node up to date.
developer_center/recipe_book/extensions_and_core/playlist_buttons_aka_playlist_commands/playlist_command_types.txt · Last modified: 2013/12/28 09:53 by geekshadow