UB1ContentPickerWidget
Overview
- Reusable ContentPicker component. Design: composition pattern (included in other widgets), unified API (same API regardless of TileView/ListView), event-driven (only emits delegates, no business logic), flexible layout (switch grid/list via EntryWidth/Height). Usage: include in another widget, set data with SetListItems(), bind the OnItemSelected/OnItemDeselected delegates, and handle business logic externally.
Metadata
| Field | Value |
|---|---|
| Kind | class |
| Environment | B1 - Presentation |
| Category | classes |
| Extends | UB1UserWidgetBase |
Properties (2)
| Name | Type | Description |
|---|---|---|
BW_TileView | any | TileView widget (uses BlueUI B1TileView). |
CurrentSelection | any | The currently selected item (Single Selection mode). |
Functions (8)
| Function | Parameters | Returns | Description |
|---|---|---|---|
ClearSelection | - | - | Clears the selection. |
GetSelectedItem | - | UB1ContentPickerEntryData | Gets the currently selected item (Single mode). |
GetSelectedItems | - | UB1ContentPickerEntryData[] | Gets all selected items (Multi mode). |
OnTileViewItemClicked | Item: UObject | - | Callback invoked on Tile View Item Clicked. |
OnTileViewItemSelectionChanged | Item: UObject | - | Handles a TileView item click event; updates only the UI state and emits a delegate. |
RegenerateList | - | - | Refreshes the list (call after data changes). |
SetListItems | Items: UObject[] | - | Sets the item list. |
SetSelectionMode | InSelectionMode: any | - | Sets the selection mode (Single/Multi). |