Class: FbUiSelectionHolder | Spider Monkey Panel

## FbUiSelectionHolder

`js/foo_spider_monkey_panel.js`, `line 2766`

  ##### Examples

  For playlist viewers

      let selection_holder = fb.AcquireUiSelectionHolder();
      selection_holder.SetPlaylistSelectionTracking();

      function on_focus(is_focused) {
          if (is_focused) { // Updates the selection when panel regains focus
              selection_holder.SetPlaylistSelectionTracking();
          }
      }

  For library viewers

      let selection_holder = fb.AcquireUiSelectionHolder();
      let handle_list = null;

      function on_mouse_lbtn_up(x, y) { // Presumably going to select something here...
         handle_list = ...;
         selection_holder.SetSelection(handle_list);
      }

      function on_focus(is_focused) {
         if (is_focused) { // Updates the selection when panel regains focus
             if (handle_list && handle_list.Count)
                 selection_holder.SetSelection(handle_list);
         }
      }

### Methods

#### SetPlaylistSelectionTracking()
`js/foo_spider_monkey_panel.js`, `line 2781`

  Sets selected items to playlist selection and enables tracking.
  When the playlist selection changes, the stored selection is automatically updated. Tracking ends when a set method is called on any ui_selection_holder or when the last reference to this ui_selection_holder is released.

#### SetPlaylistTracking()
`js/foo_spider_monkey_panel.js`, `line 2789`

  Sets selected items to playlist contents and enables tracking.
  When the playlist selection changes, the stored selection is automatically updated. Tracking ends when a set method is called on any ui_selection_holder or when the last reference to this ui_selection_holder is released.

#### SetSelection(handle_list)
`js/foo_spider_monkey_panel.js`, `line 2773`

  Sets the selected items.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `handle_list` | FbMetadbHandleList |