FbUiSelectionHolder
Examples
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();
}
}
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()
-
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()
-
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, typeopt)
-
Sets the selected items.
Parameters:
Name Type Attributes Default Description handle_list
FbMetadbHandleList type
number <optional>
0 Selection type. Possible values:
0 - default, undefined
1 - active_playlist_selection
2 - caller_active_playlist
3 - playlist_manager
4 - now_playing
5 - keyboard_shortcut_list
6 - media_library_viewer