STableViewBase

Contains ListView functionality that does not depend on the type of data being observed by the ListView.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Views/STableViewBase.h

Include

#include "Widgets/Views/STableViewBase.h"

Syntax

class STableViewBase :
    public SCompoundWidget ,
    public IScrollableWidget

Remarks

Contains ListView functionality that does not depend on the type of data being observed by the ListView.

Variables

Name Description

Protected variable

EAllowOverscrol ...

 

AllowOverscroll

Whether to permit overscroll on this list view

Protected variable

float

 

AmountScrolledWhileRightMouseDown

How much we scrolled while the rmb has been held

Protected variable

bool

 

bEnableAnimatedScrolling

True to lerp smoothly between offsets when the desired scroll offset changes.

Protected variable

bool

 

bIsScrollingActiveTimerRegistered

Whether the active timer to update the inertial scrolling is currently registered

Protected variable

bool

 

bShowSoftwareCursor

Whether the software cursor should be drawn in the viewport

Protected variable

bool

 

bStartedTouchInteraction

Did the user start an interaction in this list?

Protected variable

bool

 

bWasAtEndOfList

Last time we scrolled, did we end up at the end of the list.

Protected variable

EConsumeMouseWh ...

 

ConsumeMouseWheel

How we should handle scrolling with the mouse wheel

Protected variable

double

 

CurrentScrollOffset

The currently displayed scroll offset from the beginning of the list in items.

Protected variable

double

 

DesiredScrollOffset

The raw desired scroll offset from the beginning of the list in items.

Protected variable

TOptional < doub...

 

FixedLineScrollOffset

The fixed offset in lines to always apply to the top/left (depending on orientation) of the list.

Protected variable

TSharedPtr < SHe ...

 

HeaderRow

Column headers that describe which columns this list shows

Protected variable

FInertialScroll ...

 

InertialScrollManager

Helper object to manage inertial scrolling

Protected variable

TSharedPtr < SLi...

 

ItemsPanel

The panel which holds the visible widgets in this list

Protected variable

FReGenerateResu ...

 

LastGenerateResults

Information about the widgets we generated during the last regenerate pass

Protected variable

FOnContextMenuO ...

 

OnContextMenuOpening

Delegate to invoke when the context menu should be opening.

Protected variable

FOnTableViewScr ...

 

OnTableViewScrolled

Delegate to call when the table view is scrolled

Protected variable

EOrientation

 

Orientation

The layout and scroll orientation of the list

Protected variable

FOverscroll

 

Overscroll

Protected variable

FGeometry

 

PanelGeometryLastTick

What the list's geometry was the last time a refresh occurred.

Protected variable

FVector2D

 

PressedScreenSpacePosition

The location in screenspace the view was pressed

Protected variable

TSharedPtr < SSc ...

 

ScrollBar

The scroll bar widget

Protected variable

TAttribute < ESe ...

 

SelectionMode

The selection mode that this tree/list is in.

Protected variable

FVector2D

 

SoftwareCursorPosition

The current position of the software cursor

Public variable

const ETableVie ...

 

TableViewMode

Is this list backing a tree or just a standalone list

Protected variable

float

 

TickScrollDelta

The amount we have scrolled this tick cycle

Protected variable

float

 

WheelScrollMultiplier

How much to scroll when using mouse wheel

Constructors

Name Description

Protected function

STableViewBase

(
    ETableViewMode::Type InTableViewMod...
)

Functions

Name Description

Public function

void

 

AddScrollOffset

(
    const float InScrollOffsetDelta,
    bool RefreshList
)

Add the scroll offset of this view (in items)

Protected function

void

 

AppendWidget

(
    const TSharedRef < ITableRow >& Wid...
)

Add a WidgetToAppend to the bottom of the view.

Protected function Const

bool

 

CanUseInertialScroll

(
    float ScrollAmount
)

Check whether the current state of the table warrants inertial scroll by the specified amount

Protected function

void

 

ClearWidgets()

Remove all the widgets from the view.

Public function

void

 

ConstructChildren

(
    const TAttribute < float >& InItemW...,
    const TAttribute < float >& InItemH...,
    const TAttribute < EListItemAlignmen ...,
    const TSharedPtr < SHeaderRow >& In...,
    const TSharedPtr < SScrollBar >& In...,
    EOrientation InScrollOrientation,
    const FOnTableViewScrolled & InOnTa...
)

Create the child widgets that comprise the list

Public function

void

 

EndInertialScrolling()

Reset the inertial scroll velocity accumulated in the InertialScrollManager

Protected function

EActiveTimer ...

 

EnsureTickToRefresh

(
    double InCurrentTime,
    float InDeltaTime
)

One-off active timer to refresh the contents of the table as needed

Public function Const

TSharedPtr < ...

 

GetHeaderRow()

Protected function Const

float

 

GetItemHeight()

Get the uniform item height that is enforced by ListViews.

Protected function Const

FVector2D

 

GetItemSize()

Get the uniform item

Protected function Const

float

 

GetItemWidth()

Get the uniform item width.

Public function Const

int32

 

GetNumGeneratedChildren()

Protected function Const

int32

 

GetNumItemsBeingObserved()

Protected function Virtual Const

int32

 

GetNumItemsPerLine()

Get the number of items that can fit in the view along the line axis (orthogonal to the scroll axis) before creating a new line.

Protected function Virtual Const

float

 

GetNumLiveWidgets()

Public function Const

float

 

GetScrollOffset()

Gets the scroll offset of this view (in items)

Protected function Const

float

 

GetScrollRateInItems()

Get the scroll rate in items that best approximates a constant physical scroll rate.

Protected function Const

double

 

GetTargetScrollOffset()

Returns the "true" scroll offset where the list will ultimately settle (and may already be).

Protected function

void

 

InsertWidget

(
    const TSharedRef < ITableRow >& Wid...
)

Insert WidgetToInsert at the top of the view.

Public function Const

bool

 

IsPendingRefresh()

Return true if there is currently a refresh pending, false otherwise

Public function Const

bool

 

IsRightClickScrolling()

Public function Const

bool

 

IsUserScrolling()

Protected function Const

void

 

NavigateToWidget

(
    const uint32 UserIndex,
    const TSharedPtr < SWidget >& Navig...,
    ENavigationSource NavigationSource
)

Util Function so templates classes don't need to include SlateApplication

Protected function

void

 

NotifyItemScrolledIntoView()

Called when an item has entered the visible geometry to check to see if the ItemScrolledIntoView delegate should be fired.

Protected function Virtual

void

 

OnRightMouseButtonDown

(
    const FPointerEvent & MouseEvent
)

Right click down

Protected function Virtual

void

 

OnRightMouseButtonUp

(
    const FPointerEvent & MouseEvent
)

Opens a context menu as the result of a right click if OnContextMenuOpening is bound and we are not right click scrolling.

Public function

void

 

RebuildList()

Completely wipe existing widgets and fully regenerate them on next tick.

Protected function

FReGenerateR ...

 

ReGenerateItems

(
    const FGeometry & MyGeometry
)

Update generate Widgets for Items as needed and clean up any Widgets that are no longer needed.

Protected function

void

 

RequestLayoutRefresh()

Internal request for a layout update on the next tick (i.e. a refresh without implication that the source items have changed)

Public function Virtual

void

 

RequestListRefresh()

Mark the list as dirty so that it will refresh its widgets on next tick.

Public function

void

 

ScrollBar_OnUserScrolled

(
    float InScrollOffsetFraction
)

Invoked by the scrollbar when the user scrolls.

Protected function Virtual

float

 

ScrollBy

(
    const FGeometry & MyGeometry,
    float ScrollByAmount,
    EAllowOverscroll InAllowOverscroll
)

Scroll the list view by some number of screen units.

Protected function

EScrollIntoV ...

 

ScrollIntoView

(
    const FGeometry & ListViewGeometry
)

If there is a pending request to scroll an item into view, do so.

Protected function Virtual

float

 

ScrollTo

(
    float InScrollOffset
)

Scroll the view to an offset and resets the inertial scroll velocity

Public function

void

 

ScrollToBottom()

Scrolls the view to the bottom

Public function

void

 

ScrollToTop()

Scrolls the view to the top

Public function

void

 

SetFixedLineScrollOffset

(
    TOptional < double > InFixedLineScro...
)

Sets the fixed offset in items to always apply to the top/left (depending on orientation) of the list.

Public function

void

 

SetIsScrollAnimationEnabled

(
    bool bInEnableScrollAnimation
)

Sets whether the list should lerp between scroll offsets or jump instantly between them.

Public function

void

 

SetItemHeight

(
    TAttribute < float > Height
)

Sets the item height

Public function

void

 

SetItemWidth

(
    TAttribute < float > Width
)

Sets the item width

Public function

void

 

SetScrollbarVisibility

(
    const EVisibility InVisibility
)

Public function

void

 

SetScrollOffset

(
    const float InScrollOffset
)

Set the scroll offset of this view (in items)

Public function

void

 

SetWheelScrollMultiplier

(
    float NewWheelScrollMultiplier
)

Sets the multiplier applied when wheel scrolling.

Protected function

EActiveTimer ...

 

UpdateInertialScroll

(
    double InCurrentTime,
    float InDeltaTime
)

Active timer to update the inertial scroll

Protected function

void

 

UpdateSelectionSet()

Remove any items that are no longer in the list from the selection set.

Overridden from SWidget

Name Description

Protected function Virtual

void

 

OnClippingChanged()

Passing over the clipping to SListPanel

Public function Virtual Const

FCursorReply

 

OnCursorQuery

(
    const FGeometry & MyGeometry,
    const FPointerEvent & CursorEvent
)

The system asks each widget under the mouse to provide a cursor. This event is bubbled.

Public function Virtual

void

 

OnFocusLost

(
    const FFocusEvent & InFocusEvent
)

Called when this widget loses focus. This event does not bubble.

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry & MyGeometry,
    const FKeyEvent & InKeyEvent
)

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry & InMyGeometry,
    const FPointerEvent & InMouseEvent
)

Called when a mouse button is double clicked. Override this in derived classes.

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it.

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system calls this method to notify the widget that a mouse button was release within it.

Public function Virtual

void

 

OnMouseCaptureLost

(
    const FCaptureLostEvent & CaptureLo...
)

Called when this widget had captured the mouse, but that capture has been revoked for some reason.

Public function Virtual

void

 

OnMouseEnter

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has entered it.

Public function Virtual

void

 

OnMouseLeave

(
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has left it.

Public function Virtual

FReply

 

OnMouseMove

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system calls this method to notify the widget that a mouse moved within it.

Public function Virtual

FReply

 

OnMouseWheel

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Called when the mouse wheel is spun. This event is bubbled.

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs & Args,
    const FGeometry & AllottedGeometry,
    const FSlateRect & MyCullingRect,
    FSlateWindowElementList & OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle & InWidgetStyle,
    bool bParentEnabled
)

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Public function Virtual

FReply

 

OnPreviewMouseButtonDown

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Just like OnMouseButtonDown, but tunnels instead of bubbling.

Public function Virtual

FReply

 

OnTouchEnded

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function Virtual

FReply

 

OnTouchMoved

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is moved (finger moved)

Public function Virtual

FReply

 

OnTouchStarted

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is started (finger down)

Public function Virtual Const

bool

 

SupportsKeyboardFocus()

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Public function Virtual

void

 

Tick

(
    const FGeometry & AllottedGeometry,
    const double InCurrentTime,
    const float InDeltaTime
)

Ticks this widget with Geometry.

Overridden from IScrollableWidget

Name Description

Public function Virtual

FVector2D

 

GetScrollDistance()

Gets the distance that user has scrolled into the control in normalized coordinates (0 - 1)

Public function Virtual

FVector2D

 

GetScrollDistanceRemaining()

Gets the distance that user has left to scroll in the control before reaching the end in normalized coordinates (0 - 1)

Public function Virtual

TSharedRef < ...

 

GetScrollWidget()

Returns the typed SWidget that implements this interface

Classes

Name

Description

Protected struct

FReGenerateResults

Information about the outcome of the WidgetRegeneratePass

Enums

Name

Description

Protected enum

EScrollIntoViewResult

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback