unreal.ListViewBase

class unreal.ListViewBase(outer=None, name='None')

Bases: unreal.Widget

Bare-bones base class to make creating custom UListView widgets easier. Child classes should also inherit from ITypedUMGListView<T> to get a basic public ListView API for free.

Child classes will own the actual SListView<T> widgets, but this provides some boilerplate functionality for generating entries. To generate a row for the child list, use GenerateTypedRow with the appropriate SObjectTableRow<T> type for your list

Additionally, the entry widget class can be filtered for a particular class and interface with the EntryClass and EntryInterface metadata arguments This can be specified either on the class directly (see below) or on any BindWidget FProperty

Example: class UMyUserWidget : public UUserWidget {

UPROPERTY(BindWidget, meta = (EntryClass = MyListEntryWidget)) UListView* ListView_InventoryItems;

}

C++ Source:

  • Module: UMG

  • File: ListViewBase.h

Editor Properties: (see get_editor_property/set_editor_property)

  • accessible_behavior (SlateAccessibleBehavior): [Read-Write] Whether or not the widget is accessible, and how to describe it. If set to custom, additional customization options will appear.

  • accessible_summary_behavior (SlateAccessibleBehavior): [Read-Write] How to describe this widget when it’s being presented through a summary of a parent widget. If set to custom, additional customization options will appear.

  • accessible_summary_text (Text): [Read-Write] When AccessibleSummaryBehavior is set to Custom, this is the text that will be used to describe the widget.

  • accessible_text (Text): [Read-Write] When AccessibleBehavior is set to Custom, this is the text that will be used to describe the widget.

  • bp_on_entry_generated (OnListEntryGeneratedDynamic): [Read-Write] Called when a row widget is generated for a list item

  • bp_on_entry_released (OnListEntryReleasedDynamic): [Read-Write] Called when a row widget is released by the list (i.e. when it no longer represents a list item)

  • can_children_be_accessible (bool): [Read-Write] Whether or not children of this widget can appear as distinct accessible widgets.

  • clipping (WidgetClipping): [Read-Write] Controls how the clipping behavior of this widget. Normally content that overflows the bounds of the widget continues rendering. Enabling clipping prevents that overflowing content from being seen.

    NOTE: Elements in different clipping spaces can not be batched together, and so there is a performance cost to clipping. Do not enable clipping unless a panel actually needs to prevent content from showing up outside its bounds.

  • cursor (MouseCursor): [Read-Write] The cursor to show when the mouse is over the widget

  • enable_fixed_line_offset (bool): [Read-Write] Enable Fixed Line Offset

  • enable_scroll_animation (bool): [Read-Write] True to enable lerped animation when scrolling through the list

  • entry_widget_class (type(Class)): [Read-Write] The type of widget to create for each entry displayed in the list.

  • fixed_line_scroll_offset (float): [Read-Write] Optional fixed offset (in lines) to always apply to the top/left (depending on orientation) of the list. If provided, all non-inertial means of scrolling will settle with exactly this offset of the topmost entry. Ex: A value of 0.25 would cause the topmost full entry to be offset down by a quarter length of the preceeding entry.

  • flow_direction_preference (FlowDirectionPreference): [Read-Write] Allows you to set a new flow direction

  • is_enabled (bool): [Read-Write] Sets whether this widget can be modified interactively by the user

  • is_volatile (bool): [Read-Write] If true prevents the widget or its child’s geometry or layout information from being cached. If this widget changes every frame, but you want it to still be in an invalidation panel you should make it as volatile instead of invalidating it every frame, which would prevent the invalidation panel from actually ever caching anything.

  • navigation (WidgetNavigation): [Read-Write] The navigation object for this widget is optionally created if the user has configured custom navigation rules for this widget in the widget designer. Those rules determine how navigation transitions can occur between widgets.

  • num_designer_preview_entries (int32): [Read-Write] The number of dummy item entry widgets to preview in the widget designer

  • override_accessible_defaults (bool): [Read-Write] Override all of the default accessibility behavior and text for this widget.

  • override_cursor (bool): [Read-Write] Override Cursor

  • render_opacity (float): [Read-Write] The opacity of the widget

  • render_transform (WidgetTransform): [Read-Write] The render transform of the widget allows for arbitrary 2D transforms to be applied to the widget.

  • render_transform_pivot (Vector2D): [Read-Write] The render transform pivot controls the location about which transforms are applied. This value is a normalized coordinate about which things like rotations will occur.

  • slot (PanelSlot): [Read-Write] The parent slot of the UWidget. Allows us to easily inline edit the layout controlling this widget.

  • tool_tip_text (Text): [Read-Write] Tooltip text to show when the user hovers over the widget with the mouse

  • tool_tip_widget (Widget): [Read-Only] Tooltip widget to show when the user hovers over the widget with the mouse

  • visibility (SlateVisibility): [Read-Write] The visibility of the widget

  • wheel_scroll_multiplier (float): [Read-Write] The multiplier to apply when wheel scrolling

property bp_on_entry_generated

[Read-Write] Called when a row widget is generated for a list item

Type

(OnListEntryGeneratedDynamic)

property bp_on_entry_released

[Read-Write] Called when a row widget is released by the list (i.e. when it no longer represents a list item)

Type

(OnListEntryReleasedDynamic)

property enable_scroll_animation

[Read-Only] True to enable lerped animation when scrolling through the list

Type

(bool)

property entry_widget_class

[Read-Only] The type of widget to create for each entry displayed in the list.

Type

(type(Class))

get_displayed_entry_widgets()

Gets all of the list entry widgets currently being displayed by the list

Returns

Return type

Array(UserWidget)

regenerate_all_entries()None

Full regeneration of all entries in the list. Note that the entry UWidget instances will not be destroyed, but they will be released and re-generated. In other words, entry widgets will not receive Destruct/Construct events. They will receive OnEntryReleased and IUserObjectListEntry implementations will receive OnListItemObjectSet.

request_refresh()None

Sets the list to refresh on the next tick.

Note that refreshing, from a list perspective, is limited to accounting for discrepancies between items and entries. In other words, it will only release entries that no longer have items and generate entries for new items (or newly visible items).

It does NOT account for changes within existing items - that is up to the item to announce and an entry to listen to as needed. This can be onerous to set up for simple cases, so it’s also reasonable (though not ideal) to call RegenerateAllEntries when changes within N list items need to be reflected.

scroll_to_bottom()None

Scroll the entire list down to the bottom-most item

scroll_to_top()None

Scroll the entire list up to the first item

set_scroll_offset(scroll_offset)None

Set the scroll offset of this view (in items)

Parameters

scroll_offset (float) –

set_scrollbar_visibility(visibility)None

Set Scrollbar Visibility

Parameters

visibility (SlateVisibility) –

set_wheel_scroll_multiplier(new_wheel_scroll_multiplier)None

Set Wheel Scroll Multiplier

Parameters

new_wheel_scroll_multiplier (float) –

property wheel_scroll_multiplier

[Read-Only] The multiplier to apply when wheel scrolling

Type

(float)