foo-webview-sdk
    Preparing search index...

    Class FbUiSelectionHolder

    FbUiSelectionHolder — UI selection holder wrapper.

    Surfaces the SMP API: explicitly stamp the active foobar2000 UI selection (selection.set) or take it from the active playlist (selection.setPlaylistTracking). The host holds a selection holder only for the duration of each call, not for the life of this object.

    Backend mapping:

    • SetSelection(handles, type) → selection.set
    • SetPlaylistSelectionTracking() → selection.setPlaylistTracking ({ mode: 'selection' })
    • SetPlaylistTracking() → selection.setPlaylistTracking ({ mode: 'playlist' })

    Returns a Promise that resolves with the C++ handler envelope. Callers should always await the result because the host may refuse the request asynchronously.

    Index
    • Set the selection to the active playlist's selected rows. Unlike SMP, the host takes them once and does not keep tracking after the call.

      Returns Promise<boolean>

    • Set the selection to the whole active playlist. Unlike SMP, the host takes it once and does not keep tracking after the call.

      Returns Promise<boolean>

    • Replace the current UI selection.

      Parameters

      • handleList: unknown

        Any value accepted by toHandleIdArray (FbMetadbHandleList, plain array, etc.).

      • Optional_type: number

        Accepted for SMP compatibility and ignored; the host has no selection types.

      Returns Promise<boolean>