UDreamListView
A list whose hierarchy is code, not an asset: rows built from a source, in a scrolling viewport.
Inherits from UDreamListViewBase.
Declared in Public/Controls/DreamListView.h.
A list whose hierarchy is code, not an asset: rows built from a source, in a scrolling viewport.
UMG's ListView in the DreamGUI idiom -- and deliberately smaller than it. There is no entry-widget
protocol to implement and no data source to write: the two properties a designer actually reaches
for (a set of items, and which one is selected) are UPROPERTYs, so .dui, the designer, Blueprint
and a <-> binding can all drive them without anyone writing a line of glue.
See UDreamListViewBase for the shape of the tree, why the rows are placed rather than arranged,
when it starts recycling them, and how a Native.List sits beside the each language feature.
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
Style | FDreamListStyle | List | yes | GetStyle / SetStyle | This instance's own look. The project sheet wins while StyleSource says so AND a sheet actually exists; with no sheet in the project this IS the look in effect -- which is why it stays editable instead of being gated on the enum. |
Functions
| Function | Kind | Description |
|---|---|---|
FDreamListStyle GetStyle() | pure | By value, not by reference: a UFUNCTION return has to be a value, and a style is a small struct. |
void SetStyle(FDreamListStyle InStyle) | callable | Replace the whole look and re-push it. Row geometry is style, so this rebuilds the rows. |
Compared with UMG
Every Blueprint-facing member of the UMG class, and where it went. adopt: same name, same meaning. map: here under another name or on another type. reject: deliberately absent, with the reason.
| UMG | Member | Status | Here | Note |
|---|---|---|---|---|
UListView | GetListItems | adopt | GetListItems | A copy: a UFUNCTION return is a value, and handing out the live array would let a caller resize the thing every row is indexed into. |
UListView | AddItem | adopt | AddItem | Goes through SetItemObjects, which settles the selection and the subclass's index-keyed state against the source that is going away. AddTextItem is the same call for a text-only source. |
UListView | AddItemAt | adopt | AddItemAt | The parallel text goes in at the SAME index, blank: GetItemLabel falls back to the object's name for an index the texts do not reach, which is right at the END of a shorter array and wrong in the middle of one. |
UListView | AddItems | adopt | AddItems | One rebuild for the batch, through FScopedRebuildSuppression -- a COUNTER rather than a flag, because the batch calls are written in terms of each other. |
UListView | AddItemsAt | adopt | AddItemsAt | The one the other three are written in terms of. |
UListView | RemoveItem | adopt | RemoveItem | Takes the matching text with it: the two arrays are parallel, and shortening only one re-labels every row after the hole. Removing a selected item deselects it and fires OnSelectionChanged once, as SListView::UpdateSelectionSet does on UMG's next refresh (ESelectInfo::Direct); here it happens before the call returns. |
UListView | RemoveItems | adopt | RemoveItems | Indices collected, sorted, then removed from the BACK: every removal shifts what is after it, so ascending order would make each index after the first one wrong. |
UListView | GetItemAt | adopt | GetItemAt | |
UListView | GetNumItems | adopt | GetNumItems | Objects decide the count when there are any; texts otherwise. |
UListView | GetIndexForItem | adopt | GetIndexForItem | |
UListView | ClearListItems | adopt | ClearListItems | Empties both sources and clears the selection -- announced once on OnSelectionChanged when there was one, like any source edit that takes selected items away. |
UListView | SetSelectionMode | adopt | SetSelectionMode | EUIListSelectionMode, the four answers UUIListView already spells. |
UListView | SetScrollIntoViewAlignment | map | SetScrollIntoViewDestination | A four-answer enum rather than UMG's float: the same question the scroll box and the scroll behaviour already answer with EDreamUIScrollDestination, so a project learns it once. |
UListView | SetEnableProximateEntryNavigation | reject | See bEnableProximateEntryNavigation. | |
UListView | IsRefreshPending | reject | This control rebuilds synchronously -- every setter that moves the source rebuilds before it returns -- so there is never a pending refresh to be told about. That is deliberate: it is what makes the list correct in a headless test and on the designer's first frame. | |
UListView | ScrollIndexIntoView | adopt | ScrollIndexIntoView | Computed from the row pitch, so it answers for an item whose row is not realized -- the only version that means anything while recycling. |
UListView | SetSelectedIndex | adopt | SetSelectedIndex | |
UListView | NavigateToIndex | adopt | NavigateToIndex | Selects AND reveals, because a selection that is off screen is a selection nobody can see they made. |
UListView | WidgetStyle | map | Style | FDreamListStyle, resolved against the project style sheet. Get/SetStyle. |
UListView | ScrollBarStyle | map | FDreamListStyle::Bar | The list's style carries the bar's whole style, so one edit dresses the list and its bar together. |
UListView | bEnableShadowBrush | adopt | bEnableShadowBrush | Two overlays inside the VIEWPORT, not the scrolled column: a fade that scrolled with the content would be a stripe travelling through the list. Each is awake only while the list is scrolled away from that end, so it says 'there is more this way' rather than being permanent decoration. |
UListView | ShadowBrushStyle | map | ShadowBrush | FDreamUIFaceBrush on the CONTROL, not in FDreamListStyle: the style struct is the shared look and is resolved against the project sheet, where a fade is a per-screen decision about one list's edges. A sheet switching it on for every list at once is not an edit anyone would make on purpose. |
UListView | Orientation | adopt | Orientation | EDreamPanelOrientation, this library's two-value spelling. The control is rewritten in MAIN/CROSS axis terms rather than branching per call site: row pitch, content extent, window size, furniture, placement, offset, overscroll and the reveal all read one pair of helpers. Vertical is the default, so nothing existing moves. UDreamTreeView refuses it -- a tree's indent is measured across its rows, and UMG has no horizontal tree either. |
UListView | SelectionMode | adopt | SelectionMode | |
UListView | ConsumeMouseWheel | adopt | ConsumeMouseWheel | The same enum the scroll box uses. |
UListView | bClearSelectionOnClick | map | SelectionMode | SingleToggle IS 'a second click on the chosen row clears it'. A separate flag would be a second answer to the same question. |
UListView | bIsFocusable | map | UDreamWidget::bIsFocusable | Already on the base of every widget. |
UListView | bClearScrollVelocityOnSelection | adopt | bClearScrollVelocityOnSelection | EndInertialScrolling at the FRONT of the selection road, so the row the player picked does not slide out from under the cursor while the click is still being handled. |
UListView | bReturnFocusToSelection | adopt | bReturnFocusToSelection | Acts only when focus landed on the LIST itself: focus that already reached a row is focus doing exactly what this wants, and redirecting it would drag the player off the row they just navigated to. FocusSelectedRow is the same move as a callable, and answers false honestly when the selected item has no realized row. |
UListView | bEnableProximateEntryNavigation | reject | ARRIVING at a list is already geometric nearest-neighbour -- FDreamUINavigationScroll and UDreamWidgetNavigation pick the nearest row by rect, for every control -- which is what the flag turns on in UMG, so there is no second mode to switch to. Once on a row, a press steps by item the way SListView::OnNavigation does (UDreamListRowButton asks the list first), and only a press with nowhere to go inside the list goes back to the scan. Arrival does not select; a step does, while bSelectItemOnNavigation is on. | |
UListView | ScrollIntoViewAlignment | map | ScrollIntoViewDestination | See SetScrollIntoViewAlignment. |
UListView | HorizontalEntrySpacing | map | FDreamTileViewStyle::TileSpacing | A list has one column, so across-the-line spacing only means anything on the tile view, which is where it lives. |
UListView | VerticalEntrySpacing | map | FDreamListStyle::RowSpacing | The gap under a row, which is what one step down the column costs beyond its height. |
UListView | ScrollBarPadding | map | FDreamScrollBarStyle::BarPadding | In the bar's style, which FDreamListStyle::Bar carries -- the same field the scroll box reads. |
UListView | GetHorizontalEntrySpacing | map | UDreamTileView::GetStyle | Read off the resolved tile style; see the property row. |
UListView | GetVerticalEntrySpacing | map | GetStyle | Read off the resolved list style; see the property row. |
UListView | SetReturnFocusToSelection | adopt | SetReturnFocusToSelection | |
UListView | BP_SetSelectedItem | map | SetSelectedIndex | An index into the SOURCE, which survives a collapse where an object identity comparison per row would not. GetIndexForItem turns an object into one. |
UListView | BP_SetItemSelection | map | SetItemSelection | By index; the only call that can express a multi selection. |
UListView | BP_ClearSelection | map | ClearSelection | |
UListView | BP_GetNumItemsSelected | map | GetNumItemsSelected | |
UListView | BP_GetSelectedItems | map | GetSelectedItems | Comes back empty for a text-only source, which has no objects to answer with; GetSelectedIndices is the question to ask there. |
UListView | BP_IsItemVisible | map | IsItemVisible | True when the item currently has a row widget standing for it. |
UListView | BP_NavigateToItem | map | NavigateToIndex | By index; GetIndexForItem turns an object into one. |
UListView | BP_ScrollItemIntoView | map | ScrollItemIntoView | By index, and computed from the row pitch so it answers for an unrealized row. |
UListView | BP_CancelScrollIntoView | map | EndInertialScrolling | The eased reveal is a tween on the scroll behaviour; stopping it is stopping what is moving the content. |
UListView | BP_SetListItems | map | SetItemObjects | Takes raw pointers, because TArray<TObjectPtr<>> cannot be a UFUNCTION parameter. |
UListView | BP_GetSelectedItem | map | GetSelectedItems | Plus GetSelectedIndex for the anchor. A single-item getter would be the first element of a set the caller can already see. |
UListView | BP_OnEntryInitialized | map | OnRowInitialized | Once in a row widget's life, after the subclass's own one-time hook, so a consumer sees a row that is already wired. |
UListView | BP_OnItemClicked | map | OnItemClicked | Fires after the selection has moved, so a handler asking GetSelectedIndex sees the answer the user just gave. |
UListView | BP_OnItemDoubleClicked | map | OnItemDoubleClicked | Uses the event system's DoubleClickTime, so a list and the text field beside it agree about the interval. Said at the second press, as UMG's is (Slate routes that press to OnMouseButtonDoubleClick, not to OnMouseButtonDown); the click that press ends in still follows, and OnItemClicked still fires for it. |
UListView | BP_OnItemDragDetected | map | OnItemDragDetected | Fired while the operation is still editable, so a consumer can put its own payload or tag on it. Carries the ITEM INDEX as well as the object, because a text-only source has no object to identify a row by. |
UListView | BP_OnItemDragEnter | map | OnItemDragEnter | Any drag, not only this list's own. Forwarded by the row's own drop target, which has known its pool slot since it was made -- the base's enter/leave carry only the operation, and searching for the row would have had to guess on leave, where the hovered flag is already down. |
UListView | BP_OnItemDragLeave | map | OnItemDragLeave | See BP_OnItemDragEnter. |
UListView | BP_OnItemAcceptDrop | map | OnItemAcceptDrop | Carries EDreamItemDropZone -- AboveItem, OntoItem, BelowItem -- resolved from where the pointer sat along the row's MAIN axis, so a horizontal list reads the seams as its left and right edges. The list does NOT re-order itself: what a drop means is the consumer's to decide, and a list that moved its own source would be guessing at an edit only the data's owner can make. |
UListView | BP_OnItemDragCancelled | map | OnItemDragCancelled | Fired when the drag ended with nothing accepting, decided from the OPERATION's bDropWasHandled -- the operation outlives the row, which a recycled row or a closed screen can destroy mid-flight. |
UListView | BP_OnListViewDraggingStateChanged | map | OnDraggingStateChanged | Both edges, from the same two places that set the flag. |
UListView | BP_OnItemIsHoveredChanged | map | OnItemIsHoveredChanged | Driven by the row selectable's state, which is the one thing that already distinguishes a resting pointer from focus. Reports the ITEM, so a row re-bound under a resting pointer announces the new one. |
UListView | BP_OnItemSelectionChanged | map | OnSelectionChanged | Carries the anchor index; GetSelectedIndices is the whole answer in Multi. Fired for a click, a navigation step, the API, and a source edit that takes selected items away (once per edit, a batch being one) -- not for a selection that only moved to a new index with its item, which in UMG is no change either. |
UListView | BP_OnItemScrolledIntoView | map | OnItemScrolledIntoView | The EDGE: RefreshVisibleWindow keeps the previous realized set and announces only the arrivals, after every bind rather than inside the loop, so a handler asking what else is on screen gets the whole answer. |
UListView | BP_OnListViewScrolled | map | OnListViewScrolled | Carries the offset AND the visible fraction, because a consumer drawing its own position indicator needs both and can work out neither. |
UListView | BP_OnListViewFinishedScrolling | map | OnListViewFinishedScrolling | Latched on the first move that lands with nothing left to carry it: one call per gesture rather than one per frame of a flick. |
UListView | BP_OnListViewTouchStart | map | OnListViewTouchStart | Forwarded from UUIScrollView's new native drag-gesture broadcast, which carries the phase and whether it was a finger. From the behaviour rather than a second set of pointer subscriptions: the behaviour is what decides a gesture reaches these rows at all, and a list listening separately would announce touches for drags the behaviour refused. |
UListView | BP_OnListViewTouchMove | map | OnListViewTouchMove | See BP_OnListViewTouchStart. |
UListView | BP_OnListViewTouchEnd | map | OnListViewTouchEnd | See BP_OnListViewTouchStart. |
UListView | BP_OnIsItemSelectableOrNavigable | map | OnIsItemSelectableOrNavigable | Single-cast with a bool return, like the tree's children provider: this is a QUESTION, and two answers is an ambiguity nothing can resolve. Asked on BOTH the click road and the navigation road, or the two disagree about which rows exist. Deselecting is never vetoed -- a row that became unselectable while chosen has to be able to stop being chosen. |
UListView | EntrySpacing | map | FDreamListStyle::RowSpacing | The gap between entries is appearance, so it lives in the list's style rather than on the control: FDreamListStyle::RowSpacing, along the list's main axis (between rows of a vertical list, between columns of a horizontal one). |
UListViewBase | GetDisplayedEntryWidgets | map | RowNodes | The pool, in pool order, with RowSourceIndices saying what each one currently shows. GetRealizedRowCount / GetRowWidget are the questions a caller usually means. |
UListViewBase | GetScrollOffset | adopt | GetScrollOffset | |
UListViewBase | GetIsDraggingListItem | adopt | GetIsDraggingListItem | True only for a drag of THIS list's own row -- a drag from elsewhere hovering over it is not this list dragging. |
UListViewBase | RegenerateAllEntries | map | RebuildRows | Throws the rows away and builds them again from the source, which is what UMG's does. |
UListViewBase | ScrollToTop | adopt | ScrollToTop | |
UListViewBase | ScrollToBottom | adopt | ScrollToBottom | |
UListViewBase | SetScrollOffset | adopt | SetScrollOffset | |
UListViewBase | EndInertialScrolling | adopt | EndInertialScrolling | Forwarded to the scroll behaviour. |
UListViewBase | SetWheelScrollMultiplier | adopt | SetWheelScrollMultiplier | A list's notch is a ROW, so the multiplier scales the row pitch; the scroll box scales local units. Same name, same meaning, different unit underneath. |
UListViewBase | SetScrollbarVisibility | map | SetScrollBarVisibility | Capital B, which is this library's spelling everywhere. Takes EDreamScrollBoxScrollbarVisibility rather than ESlateVisibility. |
UListViewBase | GetScrollbarVisibility | map | GetScrollBarVisibility | See SetScrollbarVisibility. |
UListViewBase | SetAllowOverScroll | map | SetAllowOverscroll | Lower-case s in Overscroll, which is how the rest of this library spells it. |
UListViewBase | GetOverscroll | adopt | GetOverscroll | Signed local units past an end; zero in range and zero while overscroll is off. |
UListViewBase | SetIsPointerScrollingEnabled | adopt | SetIsPointerScrollingEnabled | UUIScrollView::bIsPointerScrollingEnabled, asked at the FRONT of AcceptsDragGesture and beside ConsumeMouseWheel::Never on the wheel road: the wheel and the drag are one gesture set, and a view that answers one but not the other is one whose scroll bar is the only way down. |
UListViewBase | SetIsTouchScrollingEnabled | map | SetEnableTouchScrolling | Same switch, spelled the way the scroll box spells it so the two controls read alike. |
UListViewBase | SetIsGamepadScrollingEnabled | adopt | SetIsGamepadScrollingEnabled | UUIScrollView::bIsGamepadScrollingEnabled, asked by FDreamUINavigationScroll BEFORE AnalogMouseWheelKey. Refusing there means the gesture goes to nobody: an outer container is not a fallback for a switch the author turned off on the inner one. |
UListViewBase | CancelListViewDragDrop | adopt | CancelListViewDragDrop | Through the drag-drop subsystem, not by clearing our own flags: the operation, the visual and the pointer's state are ITS, and a list that only forgot its half would leave a visual on screen with nothing to end it. When the subsystem has nothing to cancel -- a headless test, a pointer already gone -- the control still clears its own state, or every later drag would look like one already in flight. |
UListViewBase | RequestRefresh | map | RebuildRows | This control rebuilds synchronously, so there is no pending request to make: every setter that moves the source rebuilds before it returns, which is what a headless test and the designer's first frame both need. |
UListViewBase | BP_OnEntryGenerated | map | OnRowGenerated | Fires on every BIND, which while recycling is every time a row comes round to a new item. |
UListViewBase | BP_OnEntriesGenerated | adopt | OnRowsGenerated | Broadcast before RebuildRows returns, which IS the batch boundary here: this control rebuilds synchronously, so there is no pending request for a later frame to complete. |
UListViewBase | EntryWidgetClass | map | RowTemplateClass | One instance per POOL row, filling the row; the row's face, height, hover and selection stay the control's. Null is the built-in label row. |
UListViewBase | WheelScrollMultiplier | adopt | WheelScrollMultiplier | |
UListViewBase | bEnableScrollAnimation | adopt | bEnableScrollAnimation | Off by default: every existing list's reveal lands in one frame. Pushed to the behaviour's animated-wheel switch. |
UListViewBase | ScrollingAnimationInterpolationSpeed | adopt | ScrollingAnimationInterpolationSpeed | A SPEED on the list, a DURATION on the behaviour -- the same ease parameterised twice. Converted once, at the push, as a reciprocal. |
UListViewBase | bInEnableTouchAnimatedScrolling | adopt | bEnableTouchAnimatedScrolling | New UUIScrollView::bAnimateTouchScrolling: at drag end the fling's projected landing is handed to the same glide the wheel uses, and the velocity dropped so the physics does not keep pushing what the tween is already moving. |
UListViewBase | AllowOverscroll | adopt | bAllowOverscroll | |
UListViewBase | bEnableRightClickScrolling | adopt | bEnableRightClickScrolling | Pushed to UUIScrollView::bAllowRightClickDragScrolling, which is the scroll box's spelling of the same switch. |
UListViewBase | bEnableTouchScrolling | adopt | bEnableTouchScrolling | |
UListViewBase | bIsPointerScrollingEnabled | adopt | bIsPointerScrollingEnabled | See SetIsPointerScrollingEnabled. |
UListViewBase | bIsGamepadScrollingEnabled | adopt | bIsGamepadScrollingEnabled | See SetIsGamepadScrollingEnabled. |
UListViewBase | bEnableFixedLineOffset | adopt | bEnableFixedLineOffset | A branch in ScrollItemIntoView's target: the row is PINNED at a share of the window instead of merely brought inside it. What a cursor-driven menu wants -- the highlighted row stays put and the list moves under it. |
UListViewBase | FixedLineScrollOffset | adopt | FixedLineScrollOffset | 0 is the near edge, 1 the far one, half the middle. Still clamped at both ends of the range, because the ends have no line to spare. |
UListViewBase | bAllowDragging | adopt | bAllowDragging | Off, and off is LITERAL: with it false no row carries a drag behaviour at all, so an existing list gains nothing to subscribe to and nothing that could change what a press on a row means. Turning it on adds UDreamListRowDragSource -- a subclass of the library's own UDreamUIDragSource, so the press-and-move test, the operation hand-off and the end-of-drag notification are the ones every other draggable widget uses. |
UListViewBase | bAllowDragDrop | adopt | bAllowDragDrop | Separate from bAllowDragging, and both directions are useful: a palette dragged OUT of but never into wants dragging alone, an equipment list taking items from elsewhere wants dropping alone. This library adds edge scrolling, which UMG's list does not have: with bEnableDragEdgeScrolling on (off by default), an acceptable drag held within DragEdgeScrollBandSize of the viewport's ends scrolls the list that way at DragEdgeScrollSpeed, stepped on the drag-drop subsystem's hover tick. |
UListViewBase | DragDropVisualPivot | adopt | DragDropVisualPivot | Folded INTO the operation's single DragVisualOffset at drag time, because a pivot is an offset measured in the visual's own size and the library's operation carries one number for both. Needs the row's size, which is why it happens when there is a row rather than on the behaviour. |
UListViewBase | DragDropVisualOffset | adopt | DragDropVisualOffset | Added on top of the pivot, in local units. X right, Y up. |
UListViewBase | DragDropVisualEntryClass | adopt | DragDropVisualEntryClass | Null falls back to RowTemplateClass, which is the answer that needs no authoring: the thing under the cursor should look like the row it came from, and the list already knows how to make one. |
UListViewBase | DragDropOperationClass | adopt | DragDropOperationClass | UDreamDragDropOperation by default, which already carries a payload, a tag, a visual class and the cancel notification that outlives a recycled row. |
UListViewBase | DragVisualWidget | map | DragDropVisualEntryClass | A CLASS, not an instance: a list makes one visual per drag and a shared instance would be one widget two simultaneous drags fought over. The instance, once made, is the operation's. |
UListViewBase | bIsDragging | map | GetIsDraggingListItem | Private state with a pure getter rather than a writable flag: it is set by the drag beginning and cleared by it ending, and a caller writing it would be lying to every handler that reads it. GetDraggedItemIndex answers which row. |
UListViewBase | bSelectItemOnNavigation | adopt | bSelectItemOnNavigation | True, on both roads: a navigation press that steps to another row selects it, as SListView's NavigationSelect does, and NavigateToIndex selects what it reveals. Off, both only move focus and reveal, and the selection stays where the player left it -- a list you scroll through without losing the line you were on. |
UListViewBase | bAllowKeepPreselectedItems | adopt | bAllowKeepPreselectedItems | A parked index set beside the live one: ReconcileSelection re-applies a parked index the moment the source is long enough to hold it, instead of dropping it. A screen restoring 'row 7 was selected' before its data loads would otherwise lose it silently. Turning the switch off discards the parked set. |
UListViewBase | BP_OnEntryReleased | map | OnRowReleased | Fired before the new index is written, so a handler asking GetRowItemIndex is still told the one being released. |
UListViewBase | NumDesignerPreviewEntries | reject | A designer-time-only row count. This control builds its rows from the authored Items with no world and no layout pass, so the designer already sees the real list -- there is nothing for a preview count to stand in for. |