DreamGUI
类参考

UDreamListViewBase

Everything a list and a tree have in common, which is nearly all of it.

本页由 DreamGUIReferenceDocs commandlet 从反射生成,正文是头文件注释的原文(英文),所以不翻译——这样它永远和代码一致。概念讲解见核心概念。

Inherits from UDreamUIControl.

Declared in Public/Controls/DreamListView.h.

Everything a list and a tree have in common, which is nearly all of it.

A tree IS a list that indents, and this class is written to be exactly that: the viewport, the bar, the scrolled column, the row template, the row POOL, the row colours and the one selected index live here, and each concrete control adds only what makes it itself -- its typed style, and (for the tree) a depth per item, a per-row indent and a twisty. FDreamTreeViewStyle is built the same way round, carrying a whole FDreamListStyle rather than restating its fields.

This class is abstract and holds NO style property. That is deliberate, and it is the reason there is a base class at all rather than UDreamTreeView deriving from UDreamListView: the family's contract is that a control's look is ONE decision (see UDreamUIControl), and a tree inheriting a spare FDreamListStyle it never resolves would be a second source of truth wearing the same name as the real one. Each subclass declares Style, typed, and answers ResolveListStyle() with the list half of it.

THE SHAPE

A face carrying the look, a viewport clipped inside it holding the scroll behaviour, the column that slides within the viewport, and a bar along the viewport's edge -- UDreamScrollBox's arrangement, and for its reasons. Two of them are worth restating because they are not obvious: the behaviour sits on the VIEWPORT and the bar is the viewport's SIBLING, because a scroll view accepts drags from anywhere inside its own widget, so a bar hung underneath it would scroll the content every time the handle was grabbed; and the column's height is the control's statement of how far there is to scroll, never layout output.

ROWS ARE PLACED, NOT ARRANGED

The column holds NO layout container and every row states its own rect: top-anchored, stretched across, and offset by its index times the row pitch. Three things follow, and all three matter:

  • a row's height is the style's RowHeight, full stop. The previous shape put the rows in a vertical box on equal-weight Fill slots and then authored the COLUMN's height to exactly rows*RowHeight + gaps so the box would divide it back out -- an equation solved in two places that had to agree, and which stopped agreeing the moment anything measured a row's content;
  • placing row N costs nothing and depends on no sibling, which is what makes recycling possible at all: a box arranges every child it has, so a box can never show a window onto a million;
  • and the answer is available with no layout pass at all, which is what a headless test and the designer's first frame actually see.

VIRTUALIZATION IS A THRESHOLD, NOT A MODE

Under VirtualizationThreshold items there is one row widget per item and GetRowWidget answers for every index -- the contract this control has always had, and the one that makes it correct in a headless test where no viewport has been arranged. At or above it, the pool is sized to the window plus an overscan and rows are re-bound as the view moves, which is what UMG's ListView does and the only way a hundred thousand rows is anything but a hang. GetRowWidget then answers for realized rows and null for the rest, which is UMG's contract too.

A navigation press on a row is answered by the list (see UDreamListRowButton): along the scroll axis the next or previous item -- ResolveNavigationTarget, which a tile view answers per line and per column -- is scrolled into view and, while bSelectItemOnNavigation is on, selected, the way SListView::OnNavigation and NavigationSelect do it. A press with nowhere to go inside the list (past either end, or across a one-column list) is left to the ordinary geometric scan, which takes focus to whatever is beside the list -- STableViewBase::OnNavigation's answer. Arriving at a list from outside is that same scan, which lands on the nearest row and does not select it.

TAB SEES ONE STOP

A list is one Tab stop, as a browser's list box is: TabNavigation is Once, Tab enters at ResolveTabEntry's row -- the selected item's, else the first item's, the last's for Shift+Tab, found by index, scrolled into view and built, because the rows exist only for what shows -- and the next Tab leaves the list. The arrows move inside it. Next and Prev are never the rows' to step through (HandleRowNavigation leaves them to the Tab walk), and the bar is no stop at all.

WHY THE PLAIN SCROLL VIEW, NOT UUIListView

The recycling stack (UUIRecyclableScrollView, and UUIListView on top of it) is the right answer for a data source and the wrong one for a control, for reasons that are all in those files:

  • its unit is a UObject* item, because IUIRecyclableScrollViewDataSource is a UObject protocol. A Native.List's natural item is a line of text -- the same call FDreamDropdownStyle's options make -- and feeding the recycler would mean minting a UObject per label;
  • a cell only exists after Start(), which needs a live world, a registered tree AND an arranged viewport: InitializeOnDataSource sizes the cell pool from the content parent's local-space extents. A control has to be correct the instant its properties are set;
  • and UUIListView::Awake hands its data-source seat to whoever claimed it first, which is how an each block's adapter gets in. A control hosting one would be a third party to that seat.

So the rows are built here, from a template, into a column inside a plain UUIScrollView -- which is what UDreamDropdown's option list does, because it is the same problem.

HOW THIS RELATES TO each

They are the two halves of the same need and they do not compete:

each Track in Tracks { ... } is the LANGUAGE route. It compiles a repeated subtree into the generated class, feeds a host recyclable view through UDreamUIEachAdapter, and binds each row's fields to the item's members (Text <- Track.Title). You get arbitrary row shape and per-field bindings, and you pay for it with a .dui class to live in and a row you have to draw yourself.

Native.List is the CONTROL route. One tag, two properties, and you have a list that looks like every other list in the project because its rows come from the style sheet.

Reach for each when the ROW is the interesting part. Reach for Native.List when the LIST is.

Properties

NameTypeCategoryIn the details panelFrom BlueprintDescription
ItemsTArray<FText>ListyesGetItems / SetItemsThe rows, as text. The common case, and the control's job is to be the common case -- the same call UDreamDropdown's Options make. Parallel to ItemObjects when both are given: the object carries the data, this carries what the built-in row says.
ItemObjectsTArray<TObjectPtr<UObject> >Listyesread / writeThe rows, as objects. Non-empty, this decides the row count and each row's item; the label then comes from the matching entry of Items, or from the object's name when there is none. This is the seat UUIListView's own Items array occupies, kept so a consumer that already models its rows as UObjects does not have to unpack them into text first.
RowTemplateClassTSubclassOf<UDreamUserWidget>ListyesGetRowTemplateClass / SetRowTemplateClassA row's CONTENT, authored elsewhere: one instance of this class is created inside every row widget, filling it, and the built-in label steps aside. The row's face, height, hover and selection stay the control's, so a template only has to draw an item.
SelectedIndexint32ListyesGetSelectedIndex / SetSelectedIndexThe selected row, as an index into the SOURCE -- not into the rows on screen. For a list the two are the same; for a tree they are not, and an index that survives a collapse is the one worth handing to a binding. -1 is none.
SelectionModeEUIListSelectionModeListyesGetSelectionMode / SetSelectionModeHow many rows can be selected at once, in UUIListView's four modes -- the same enum, because they are the same four answers and a second one spelling them again is a second thing to keep true. None ignores clicks; Single always leaves exactly one chosen; SingleToggle lets a second click on the chosen row clear it; Multi accumulates.
SelectedIndicesTArray<int32>ListyesGetSelectedIndices / SetSelectedIndicesEvery selected row, as source indices, in the order they were chosen. Authorable, but the ordinary road is SetItemSelection / SetSelectedIndex -- those keep SelectedIndex in step and repaint.
bAlternatingRowColorsboolListyesGetAlternatingRowColors / SetAlternatingRowColorsEvery other row wears FDreamListStyle::RowAlternate. Off is the dense list UMG draws.
bShowScrollBarboolListyesGetShowScrollBar / SetShowScrollBarOff means no bar at all, and the viewport keeps the gutter it would have cost.
ScrollBarVisibilityEDreamScrollBoxScrollbarVisibilityListyesGetScrollBarVisibility / SetScrollBarVisibilityWhether the bar stays put or disappears while every row already fits. Hidden never draws it, though the list still scrolls, and keeps its gutter while the rows overflow, as a Hidden Slate bar keeps its slot.
VirtualizationThresholdint32ListyesGetVirtualizationThreshold / SetVirtualizationThresholdAbove this many rows the list recycles a window of widgets instead of building one per item.
VirtualizationOverscanint32ListyesGetVirtualizationOverscan / SetVirtualizationOverscanExtra rows kept realized past each edge of the window, so a fast scroll never shows a gap.
WheelScrollMultiplierfloatListyesGetWheelScrollMultiplier / SetWheelScrollMultiplierHow many ROWS a wheel notch travels. One is the only sensitivity a list can state without guessing -- it is the unit the content is made of -- and this is the multiplier on it, for a long list where a row at a time is too slow. Zero stops the wheel.
OrientationEDreamPanelOrientationListyesGetOrientation / SetOrientationWhich way the rows run -- UMG's Orientation, and the axis this whole control is written in.
ConsumeMouseWheelEDreamScrollBoxConsumeMouseWheelListyesGetConsumeMouseWheel / SetConsumeMouseWheelWhether the wheel is swallowed here or handed to an outer scrolling ancestor at a limit -- the same three answers, and the same enum, a scroll box gives.
bAllowOverscrollboolListyesGetAllowOverscroll / SetAllowOverscrollLet the rows be pulled past an end and spring back -- UMG's AllowOverscroll.
bEnableTouchScrollingboolListyesGetEnableTouchScrolling / SetEnableTouchScrollingWhether a TOUCH drag scrolls the rows -- UMG's bEnableTouchScrolling. A mouse drag is unaffected.
bEnableRightClickScrollingboolListyesGetEnableRightClickScrolling / SetEnableRightClickScrollingWhether a drag with the RIGHT button scrolls the rows -- UMG's bEnableRightClickScrolling.
ScrollIntoViewDestinationEDreamUIScrollDestinationListyesGetScrollIntoViewDestination / SetScrollIntoViewDestinationWhere a row revealed by ScrollIndexIntoView or by navigation ends up -- UMG calls this ScrollIntoViewAlignment and spells it as a float; this is the four-answer enum the scroll box and the scroll behaviour already share, because they are the same question.
bEnableFixedLineOffsetboolListyesGetEnableFixedLineOffset / SetEnableFixedLineOffsetPin a revealed row at a fixed share of the window instead of merely bringing it inside -- UMG's bEnableFixedLineOffset.
FixedLineScrollOffsetfloatListyesGetFixedLineScrollOffset / SetFixedLineScrollOffsetWhere in the window that row is pinned, 0 = the near edge, 1 = the far one. Half is the middle.
bSelectItemOnNavigationboolListyesGetSelectItemOnNavigation / SetSelectItemOnNavigationWhether landing on a row by navigation also SELECTS it -- UMG's bSelectItemOnNavigation.
bAllowKeepPreselectedItemsboolListyesGetAllowKeepPreselectedItems / SetAllowKeepPreselectedItemsWhether a selection made before its item arrived is REMEMBERED -- UMG's bAllowKeepPreselectedItems.
bClearScrollVelocityOnSelectionboolListyesGetClearScrollVelocityOnSelection / SetClearScrollVelocityOnSelectionWhether choosing a row also stops a fling -- UMG's bClearScrollVelocityOnSelection.
bEnableScrollAnimationboolListyesGetEnableScrollAnimation / SetEnableScrollAnimationWhether the reveal and the wheel GLIDE rather than jump -- UMG's bEnableScrollAnimation.
ScrollingAnimationInterpolationSpeedfloatListyesGetScrollingAnimationInterpolationSpeed / SetScrollingAnimationInterpolationSpeedHow fast that glide closes the distance -- UMG's ScrollingAnimationInterpolationSpeed, and its parameterisation: a SPEED, where the scroll behaviour's own tween takes a duration.
bEnableTouchAnimatedScrollingboolListyesGetEnableTouchAnimatedScrolling / SetEnableTouchAnimatedScrollingWhether a TOUCH drag glides too -- UMG's bInEnableTouchAnimatedScrolling.
bIsPointerScrollingEnabledboolListyesGetIsPointerScrollingEnabled / SetIsPointerScrollingEnabledWhether a POINTER can scroll this list at all -- UMG's bIsPointerScrollingEnabled.
bIsGamepadScrollingEnabledboolListyesGetIsGamepadScrollingEnabled / SetIsGamepadScrollingEnabledWhether the analog stick can scroll it -- UMG's bIsGamepadScrollingEnabled.
bReturnFocusToSelectionboolListyesGetReturnFocusToSelection / SetReturnFocusToSelectionWhether focus arriving at the LIST is handed on to the selected row -- UMG's bReturnFocusToSelection.
bEnableShadowBrushboolListyesGetEnableShadowBrush / SetEnableShadowBrushDraw a fade at each end of the window while there is more list out there -- UMG's bEnableShadowBrush.
ShadowBrushFDreamUIFaceBrushListyesSetShadowBrushWhat that fade is drawn with -- UMG's ShadowBrushStyle.
ShadowBrushThicknessfloatListyesGetShadowBrushThickness / SetShadowBrushThicknessHow deep the fade reaches into the window, in local units.
bAllowDraggingboolListDragyesGetAllowDragging / SetAllowDragging
bAllowDragDropboolListDragyesGetAllowDragDrop / SetAllowDragDrop
DragDropVisualPivotFVector2DListDragyesSetDragDropVisualPivot
DragDropVisualOffsetFVector2DListDragyesSetDragDropVisualOffset
DragDropVisualEntryClassTSubclassOf<UDreamUserWidget>ListDragyesSetDragDropVisualEntryClass
DragDropOperationClassTSubclassOf<UDreamDragDropOperation>ListDragyesSetDragDropOperationClass
DragOperationTagFNameListDragyesSetDragOperationTag
bEnableDragEdgeScrollingboolListDragyesGetEnableDragEdgeScrolling / SetEnableDragEdgeScrolling
DragEdgeScrollBandSizefloatListDragyesGetDragEdgeScrollBandSize / SetDragEdgeScrollBandSize
DragEdgeScrollSpeedfloatListDragyesGetDragEdgeScrollSpeed / SetDragEdgeScrollSpeed
OnIsItemSelectableOrNavigableFDreamListItemSelectableQueryList-read / writeWhether one item may be chosen or navigated to -- UMG's BP_OnIsItemSelectableOrNavigable.
FaceNodeTObjectPtr<UDreamWidget>List-read onlyThe face: the list's own look, and what cuts everything off at its rounded edge.
ViewportNodeTObjectPtr<UDreamWidget>List-read onlyThe window the rows slide behind, and where the scroll behaviour lives.
ColumnNodeTObjectPtr<UDreamWidget>List-read onlyThe scrolled content: as tall as ALL rows while the viewport shows only what fits.
RowTemplateNodeTObjectPtr<UDreamWidget>List-read onlyThe thing rows are copied from -- authored once, inactive, never drawn itself. Public because it is half of the "hand it a template" story: anything added under this node before the first rebuild rides into every row.
RowLabelNodeTObjectPtr<UDreamWidget>List-read onlyThe template's label. Every row has a copy of it, found by display name.
ScrollBarNodeTObjectPtr<UDreamScrollBar>List-read onlyA real Native.ScrollBar, so the handle geometry the anchor rule dictates exists once.
ScrollBehaviourTObjectPtr<UUIScrollView>List-read only
RowNodesTArray<TObjectPtr<UDreamWidget> >List-read onlyThe row widgets that exist, in pool order -- which is visual order only while the list is not recycling. RowSourceIndices says what each one is currently showing.
RowSourceIndicesTArray<int32>List-read onlyParallel to RowNodes: which source item each pool row stands for, or -1 while it is parked.

Functions

FunctionKindDescription
void AddItem(UObject* InItem)callableAppend one object to the source and rebuild -- UMG's AddItem.
void AddItemAt(UObject* InItem, int32 InItemIndex)callableInsert one object at a source index and rebuild -- UMG's AddItemAt.
void AddItems(TArray<UObject*> InItems)callableAppend several objects and rebuild ONCE -- UMG's AddItems.
void AddItemsAt(TArray<UObject*> InItems, int32 InItemIndex)callableInsert several objects at a source index and rebuild once -- UMG's AddItemsAt.
void AddTextItem(FText InItem)callableAppend one line of text to the source and rebuild. The text source's half of AddItem.
bool CancelListViewDragDrop()callableEnd a drag from this list with no drop -- UMG's CancelListViewDragDrop.
void ClearListItems()callableEmpty both sources, clear the selection and rebuild -- UMG's ClearListItems.
void ClearSelection()callableNothing selected. Announced, unless there was nothing selected to begin with.
void EndInertialScrolling()callableDrop the fling, keeping the position -- UMG's EndInertialScrolling.
bool FocusSelectedRow()callablePut keyboard focus on the selected row's widget, if it has one on screen.
bool GetAllowDragDrop()pureGet Allow Drag Drop
bool GetAllowDragging()pureGet Allow Dragging
bool GetAllowKeepPreselectedItems()pureGet Allow Keep Preselected Items
bool GetAllowOverscroll()pureGet Allow Overscroll
bool GetAlternatingRowColors()pureGet Alternating Row Colors
bool GetClearScrollVelocityOnSelection()pureGet Clear Scroll Velocity on Selection
EDreamScrollBoxConsumeMouseWheel GetConsumeMouseWheel()pureGet Consume Mouse Wheel
float GetDragEdgeScrollBandSize()pureGet Drag Edge Scroll Band Size
float GetDragEdgeScrollSpeed()pureGet Drag Edge Scroll Speed
int32 GetDraggedItemIndex()pureThe source index of the item the drag in flight carries -- where it is now, when an object source moved under the drag -- or -1 when nothing is being dragged.
bool GetEnableDragEdgeScrolling()pureGet Enable Drag Edge Scrolling
bool GetEnableFixedLineOffset()pureGet Enable Fixed Line Offset
bool GetEnableRightClickScrolling()pureGet Enable Right Click Scrolling
bool GetEnableScrollAnimation()pureGet Enable Scroll Animation
bool GetEnableShadowBrush()pureGet Enable Shadow Brush
bool GetEnableTouchAnimatedScrolling()pureGet Enable Touch Animated Scrolling
bool GetEnableTouchScrolling()pureGet Enable Touch Scrolling
float GetFixedLineScrollOffset()pureGet Fixed Line Scroll Offset
int32 GetIndexForItem(UObject* InItem)pureWhere an object sits in the source, or -1 when it is not in it -- UMG's GetIndexForItem.
bool GetIsDraggingListItem()pureTrue while a row of THIS list is being dragged -- UMG's bIsDragging / GetIsDraggingListItem.
bool GetIsGamepadScrollingEnabled()pureGet Is Gamepad Scrolling Enabled
bool GetIsPointerScrollingEnabled()pureGet Is Pointer Scrolling Enabled
UObject* GetItemAt(int32 InItemIndex)pureThe object at a source index, or null for a text-only source or an index out of range.
int32 GetItemCount()pureHow many items the source holds -- objects if it has any, texts otherwise.
TArray<FText> GetItems()pureGet Items
TArray<UObject*> GetListItems()pureThe object source, as raw pointers -- UMG's GetListItems.
int32 GetNumItems()pureHow many items the source holds -- UMG's name for GetItemCount.
int32 GetNumItemsSelected()pureHow many rows are selected -- UMG's GetNumItemsSelected.
EDreamPanelOrientation GetOrientation()pureGet Orientation
float GetOverscroll()pureSigned distance past an end, in local units -- UMG's GetOverscroll.
int32 GetRealizedRowCount()pureHow many row widgets exist. Equal to GetRowCount until the list starts recycling.
bool GetReturnFocusToSelection()pureGet Return Focus to Selection
int32 GetRowCount()pureHow many rows the list is SHOWING -- for a tree the visible count, which is the point of a tree. Not the number of widgets: see GetRealizedRowCount for that.
int32 GetRowItemIndex(int32 InPoolIndex)pureWhich source item a POOL row is currently showing, or -1 while it is parked.
TSubclassOf<UDreamUserWidget> GetRowTemplateClass()pureGet Row Template Class
UDreamWidget* GetRowWidget(int32 InItemIndex)pureThe row standing for a source item, or null when that item has no row right now -- collapsed under a tree node, gone from the source, or (while recycling) scrolled out of the window.
EDreamScrollBoxScrollbarVisibility GetScrollBarVisibility()pureGet Scroll Bar Visibility
float GetScrollingAnimationInterpolationSpeed()pureGet Scrolling Animation Interpolation Speed
EDreamUIScrollDestination GetScrollIntoViewDestination()pureGet Scroll Into View Destination
float GetScrollOffset()pureHow far down the column the viewport currently sits, in local units.
int32 GetSelectedIndex()pureGet Selected Index
TArray<int32> GetSelectedIndices()pureEvery selected row, as source indices, in the order they were chosen.
TArray<UObject*> GetSelectedItems()pureThe selected rows as their item OBJECTS, for a source that has them -- UMG's GetSelectedItems. A text-only source has no objects to answer with, so this comes back empty there and GetSelectedIndices is the question to ask instead.
EUIListSelectionMode GetSelectionMode()pureGet Selection Mode
bool GetSelectItemOnNavigation()pureGet Select Item on Navigation
float GetShadowBrushThickness()pureGet Shadow Brush Thickness
bool GetShowScrollBar()pureGet Show Scroll Bar
float GetViewFraction()pureFraction of the rows currently on screen, 0..1. One when they all fit.
int32 GetVirtualizationOverscan()pureGet Virtualization Overscan
int32 GetVirtualizationThreshold()pureGet Virtualization Threshold
float GetWheelScrollMultiplier()pureGet Wheel Scroll Multiplier
bool IsItemSelectableOrNavigable(int32 InItemIndex)pureWhether the veto lets this item be chosen or navigated to. True when nothing is bound.
bool IsItemSelected(int32 InItemIndex)pureIs Item Selected
bool IsItemVisible(int32 InItemIndex)pureTrue when an item currently has a row widget standing for it -- UMG's IsItemVisible.
bool IsVirtualizing()pureTrue while the list is showing a window of widgets rather than one per item.
void NavigateToIndex(int32 InItemIndex)callableSelect an item's row AND bring it into view -- UMG's NavigateToIndex.
void RebuildRows()callableThrow the rows away and build them again from the source. Called for you by ApplyStyle -- row geometry and row colour are both style, so there is no such thing as re-styling without it -- and by every setter that moves the source.
void RemoveItem(UObject* InItem)callableDrop one object from the source and rebuild -- UMG's RemoveItem.
void RemoveItemAt(int32 InItemIndex)callableDrop the item at a source index and rebuild. Out of range does nothing.
void RemoveItems(TArray<UObject*> InItems)callableDrop several objects and rebuild once -- UMG's RemoveItems.
EDreamItemDropZone ResolveDropZone(float InFractionAlongRow, float InEdgeFraction)pureWhich zone a point falls in, as a fraction ALONG the row's main axis.
void ScrollIndexIntoView(int32 InItemIndex)callableBring an item's row into view without touching the selection -- UMG's ScrollIndexIntoView.
bool ScrollItemIntoView(int32 InItemIndex, bool bInAnimate)callableScroll the least distance that brings an item's row fully into the viewport.
void ScrollToBottom()callableJump to the last row -- UMG's ScrollToBottom.
void ScrollToTop()callableJump to the first row -- UMG's ScrollToTop.
void SetAllowDragDrop(bool bInAllow)callableSet Allow Drag Drop
void SetAllowDragging(bool bInAllow)callableSet Allow Dragging
void SetAllowKeepPreselectedItems(bool bInAllow)callableSet Allow Keep Preselected Items
void SetAllowOverscroll(bool bInAllow)callableSet Allow Overscroll
void SetAlternatingRowColors(bool bInAlternating)callableThe five knobs below are read only by the style push or the row build, so each setter writes the field and then makes that push itself -- which is the whole of what a BlueprintSetter buys here. Restyling never creates or destroys a row (see the list's restyle-identity test), so the first three are cheap; the two virtualization knobs change how many rows there ARE, and go through RebuildRows for that reason.
void SetClearScrollVelocityOnSelection(bool bInClear)callableSet Clear Scroll Velocity on Selection
void SetConsumeMouseWheel(EDreamScrollBoxConsumeMouseWheel InConsume)callableSet Consume Mouse Wheel
void SetDragDropOperationClass(TSubclassOf<UDreamDragDropOperation> InOperationClass)callableSet Drag Drop Operation Class
void SetDragDropVisualEntryClass(TSubclassOf<UDreamUserWidget> InEntryClass)callableSet Drag Drop Visual Entry Class
void SetDragDropVisualOffset(FVector2D InOffset)callableSet Drag Drop Visual Offset
void SetDragDropVisualPivot(FVector2D InPivot)callableThe five below are read when a drag STARTS, so setting one is all a setter has to do; a drag already in flight keeps the visual and the operation it began with.
void SetDragEdgeScrollBandSize(float InBandSize)callableClamped at zero. Read on every step, so a change reaches a drag already in flight.
void SetDragEdgeScrollSpeed(float InSpeed)callableClamped at zero. Read on every step, like the band.
void SetDragOperationTag(FName InTag)callableSet Drag Operation Tag
void SetEnableDragEdgeScrolling(bool bInEnable)callableTurning it off mid-drag stops a scroll already under way, and says it finished.
void SetEnableFixedLineOffset(bool bInEnable)callableSet Enable Fixed Line Offset
void SetEnableRightClickScrolling(bool bInEnable)callableSet Enable Right Click Scrolling
void SetEnableScrollAnimation(bool bInEnable)callableSet Enable Scroll Animation
void SetEnableShadowBrush(bool bInEnable)callableSet Enable Shadow Brush
void SetEnableTouchAnimatedScrolling(bool bInEnable)callableSet Enable Touch Animated Scrolling
void SetEnableTouchScrolling(bool bInEnable)callableSet Enable Touch Scrolling
void SetFixedLineScrollOffset(float InOffset)callableSet Fixed Line Scroll Offset
void SetIsGamepadScrollingEnabled(bool bInEnable)callableSet Is Gamepad Scrolling Enabled
void SetIsPointerScrollingEnabled(bool bInEnable)callableSet Is Pointer Scrolling Enabled
void SetItemObjects(TArray<UObject*> InItems)callableReplace the object source and rebuild.
void SetItems(TArray<FText> InItems)callableReplace the text source and rebuild.
void SetItemSelection(int32 InItemIndex, bool bInSelected, bool bInClearOthers)callableAdd or remove ONE row from the selection, which is the only call that can express a multi selection. bInClearOthers is implied by every mode except Multi.
void SetOrientation(EDreamPanelOrientation InOrientation)callableTurn the whole control through ninety degrees.
void SetReturnFocusToSelection(bool bInReturn)callableSet Return Focus to Selection
void SetRowTemplateClass(TSubclassOf<UDreamUserWidget> InClass)callableReplace the class every row's content is made from.
void SetScrollBarVisibility(EDreamScrollBoxScrollbarVisibility InVisibility)callableSet Scroll Bar Visibility
void SetScrollingAnimationInterpolationSpeed(float InSpeed)callableSet Scrolling Animation Interpolation Speed
void SetScrollIntoViewDestination(EDreamUIScrollDestination InDestination)callableSet Scroll Into View Destination
void SetScrollOffset(float InOffset)callablePut the viewport at an offset down the column, in local units. Clamped by the scroll range.
void SetSelectedIndex(int32 InIndex)callableMoves the highlight and fires both selection events. Out of range selects nothing.
void SetSelectedIndexWithoutNotify(int32 InIndex)callableThe same move, silently: for pushing an authored value in, which is not the user choosing.
void SetSelectedIndices(TArray<int32> InIndices)callableReplace the whole selection at once. Keeps the anchor and the rows' paint in step with it.
void SetSelectionMode(EUIListSelectionMode InMode)callableWhich mode decides how many rows can be chosen. Re-narrows the selection when it has to, and says so once when that changed it -- None drops the whole selection, Multi to a single mode keeps the anchor -- so a two-way binding is not left holding a row nothing selects any more.
void SetSelectItemOnNavigation(bool bInSelect)callableSet Select Item on Navigation
void SetShadowBrush(FDreamUIFaceBrush InShadowBrush)callableThe image drawn over the viewport's edges while there is more to scroll to. Pushed at once.
void SetShadowBrushThickness(float InThickness)callableSet Shadow Brush Thickness
void SetShowScrollBar(bool bInShowScrollBar)callableSet Show Scroll Bar
void SetVirtualizationOverscan(int32 InOverscan)callableSet Virtualization Overscan
void SetVirtualizationThreshold(int32 InThreshold)callableCrossing the threshold changes whether the list pools, so this rebuilds rather than restyles.
void SetWheelScrollMultiplier(float InMultiplier)callableSet Wheel Scroll Multiplier

Events

EventSignatureDescription
OnSelectionChangedvoid DreamListSelectionChangedEvent__DelegateSignature(int32 SelectedIndex)Re-broadcast from the rows, so a consumer binds to the control, not to a part of it.
OnValueChangedBPvoid DreamListSelectionChangedEvent__DelegateSignature(int32 SelectedIndex)The <-> convention: two-way bindings synthesize their reverse route against this exact name, so a value control carries it alongside its spoken events. Fires with them.
OnRowGeneratedvoid DreamListRowEvent__DelegateSignature(int32 ItemIndex, UDreamWidget* Row, UObject* Item)One per row, every time it is BOUND to an item -- which, while recycling, is every time that row comes back round to a new item rather than once in its life, and on every row the list re-pushes (a rebuild, a style push, a resize), because that re-writes the row's look. A scroll that leaves a row on its item binds nothing. Always after an OnRowReleased for whatever the row stood for before, so the two pair up. The hook for a consumer whose rows are richer than a label but who would rather not author a whole class: everything under the row is reachable from here by display name.
OnRowReleasedvoid DreamListRowEvent__DelegateSignature(int32 ItemIndex, UDreamWidget* Row, UObject* Item)The counterpart of OnRowGenerated: a pool row is about to stop standing for this item, because it is re-bound -- to another item, or to this one again by a re-push -- parked, or destroyed. Carries the item the row was bound to, object included, even when the source has moved since. UMG's OnEntryReleased, and the hook for undoing whatever OnRowGenerated did to that row.
OnItemClickedvoid DreamListItemEvent__DelegateSignature(int32 ItemIndex, UObject* Item)A row was clicked -- every click, whatever the selection mode did with it. Separate from OnSelectionChanged because a click on the already-selected row is still a click, and because a list whose SelectionMode is None still wants to know.
OnItemDoubleClickedvoid DreamListItemEvent__DelegateSignature(int32 ItemIndex, UObject* Item)Two clicks on the same row inside the event system's DoubleClickTime.
OnItemIsHoveredChangedvoid DreamListItemHoverEvent__DelegateSignature(int32 ItemIndex, UObject* Item, bool bIsHovered)The pointer entered or left a row -- UMG's OnItemIsHoveredChanged.
OnListViewScrolledvoid DreamListScrolledEvent__DelegateSignature(float CurrentOffset, float ViewFraction)The list moved -- UMG's OnListViewScrolled. Carries the offset and the visible fraction, which is what a consumer drawing its own position indicator needs and cannot work out alone.
OnListViewFinishedScrollingvoid DreamListScrolledEvent__DelegateSignature(float CurrentOffset, float ViewFraction)The list stopped moving -- UMG's OnListViewFinishedScrolling.
OnRowInitializedvoid DreamListRowEvent__DelegateSignature(int32 ItemIndex, UDreamWidget* Row, UObject* Item)A row widget was just created -- UMG's OnEntryInitialized, and ONCE in that widget's life.
OnRowsGeneratedvoid DreamListEntriesGeneratedEvent__DelegateSignature(int32 RealizedRowCount)A whole rebuild finished -- UMG's BP_OnEntriesGenerated.
OnItemScrolledIntoViewvoid DreamListRowEvent__DelegateSignature(int32 ItemIndex, UDreamWidget* Row, UObject* Item)An item came into the realized window -- UMG's BP_OnItemScrolledIntoView.
OnListViewTouchStartvoid DreamListScrolledEvent__DelegateSignature(float CurrentOffset, float ViewFraction)A touch drag began on the rows -- UMG's BP_OnListViewTouchStart. Offset and visible fraction.
OnListViewTouchMovevoid DreamListScrolledEvent__DelegateSignature(float CurrentOffset, float ViewFraction)
OnListViewTouchEndvoid DreamListScrolledEvent__DelegateSignature(float CurrentOffset, float ViewFraction)
OnItemDragDetectedvoid DreamListItemDragEvent__DelegateSignature(int32 ItemIndex, UObject* Item, UDreamDragDropOperation* Operation)A row was picked up -- UMG's BP_OnItemDragDetected. The operation is still editable here.
OnItemDragEntervoid DreamListItemDragEvent__DelegateSignature(int32 ItemIndex, UObject* Item, UDreamDragDropOperation* Operation)A drag entered a row -- UMG's BP_OnItemDragEnter. Any drag, not only this list's own.
OnItemDragLeavevoid DreamListItemDragEvent__DelegateSignature(int32 ItemIndex, UObject* Item, UDreamDragDropOperation* Operation)
OnItemAcceptDropvoid DreamListItemDropEvent__DelegateSignature(int32 ItemIndex, UObject* Item, UDreamDragDropOperation* Operation, EDreamItemDropZone DropZone)A drop landed on a row -- UMG's BP_OnItemAcceptDrop, with the zone it landed in.
OnItemDragCancelledvoid DreamListItemDragEvent__DelegateSignature(int32 ItemIndex, UObject* Item, UDreamDragDropOperation* Operation)A drag from this list ended with nobody accepting -- UMG's BP_OnItemDragCancelled.
OnDraggingStateChangedvoid DreamListDraggingStateEvent__DelegateSignature(bool bIsDragging)This list started or stopped dragging one of its rows -- UMG's BP_OnListViewDraggingStateChanged.

本页目录