SScrollBox

[SScrollBox](API\Runtime\Slate\Widgets\Layout\SScrollBox) can scroll through an arbitrary number of widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Layout/SScrollBox.h

Include

#include "Widgets/Layout/SScrollBox.h"

Syntax

class SScrollBox : public SCompoundWidget

Remarks

SScrollBox can scroll through an arbitrary number of widgets.

Variables

Name Description

Protected variable

EAllowOverscrol...

 

AllowOverscroll

Whether to permit overscroll on this scroll box

Protected variable

float

 

AmountScrolledWhileRightMouseDown

How much we scrolled while the rmb has been held

Protected variable

bool: 1

 

bAllowsRightClickDragScrolling

Protected variable

bool: 1

 

bAnimateScroll

Should the current scrolling be animated or immediately jump to the desired scroll offer

Protected variable

bool: 1

 

bAnimateWheelScrolling

Whether to animate wheel scrolling

Protected variable

TOptional< int3...

 

bFingerOwningTouchInteraction

Did the user start an interaction in this list?

Protected variable

bool: 1

 

bIsScrolling

Are we actively scrolling right now

Protected variable

bool: 1

 

bIsScrollingActiveTimerRegistered

Whether the active timer to update the inertial scroll is registered

Protected variable

bool: 1

 

bScrollBarIsExternal

Whether or not the user supplied an external scrollbar to control scrolling.

Protected variable

bool: 1

 

bScrollToEnd

If true, will scroll to the end next Tick

Protected variable

bool: 1

 

bShowSoftwareCursor

Whether the software cursor should be drawn in the viewport

Protected variable

bool: 1

 

bTouchPanningCapture

Protected variable

FGeometry

 

CachedGeometry

Cached geometry for use with the active timer

Protected variable

EConsumeMouseWh...

 

ConsumeMouseWheel

How we should handle scrolling with the mouse wheel

Protected variable

FInertialScroll...

 

InertialScrollManager

Helper object to manage inertial scrolling

Protected variable

double

 

LastScrollTime

Protected variable

EDescendantScro...

 

NavigationDestination

Sets where to scroll a widget to when using explicit navigation or if ScrollWhenFocusChanges is enabled

Protected variable

float

 

NavigationScrollPadding

The amount of padding to ensure exists between the item being navigated to, at the edge of the scrollbox.

Protected variable

FOnUserScrolled

 

OnUserScrolled

Fired when the user scrolls the scrollbox

Protected variable

EOrientation

 

Orientation

The scrolling and stacking orientation.

Protected variable

FOverscroll

 

Overscroll

The overscroll state management structure.

Protected variable

float

 

PendingScrollTriggerAmount

The current deviation we've accumulated on scrol, once it passes the trigger amount, we're going to begin scrolling.

Protected variable

TSharedPtr< SSc...

 

ScrollBar

The scrollbar which controls scrolling for the scrollbox.

Protected variable

const FScrollBa...

 

ScrollBarStyle

Style resource for the scrollbar

Protected variable

TFunction< void...

 

ScrollIntoViewRequest

Scroll into view request.

Protected variable

TSharedPtr< cla...

 

ScrollPanel

The panel which stacks the child slots

Protected variable

EScrollWhenFocu...

 

ScrollWhenFocusChanges

Scroll behavior when user focus is given to a child widget

Protected variable

FVector2D

 

SoftwareCursorPosition

The current position of the software cursor

Protected variable

const FScrollBo...

 

Style

Style resource for the scrollbox

Protected variable

float

 

TickScrollDelta

The amount we have scrolled this tick cycle

Protected variable

TSharedPtr< FAc...

 

UpdateInertialScrollHandle

Protected variable

float

 

WheelScrollMultiplier

Multiplier applied to each click of the scroll wheel (applied alongside the global scroll amount)

Constructors

Name Description

Public function

SScrollBox()

Functions

Name Description

Public function

SScrollBox::...

 

AddSlot()

Adds a slot to SScrollBox

Public function

void

 

ClearChildren()

Removes all children from the box

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function

void

 

EndInertialScrolling()

Public function Const

EAllowOversc...

 

GetAllowOverscroll()

Public function

EOrientation

 

GetOrientation()

Get the current orientation of the scrollbox.

Public function Const

float

 

GetScrollOffset()

Public function Const

float

 

GetScrollOffsetOfEnd()

Gets the scroll offset of the bottom of the ScrollBox in Slate Units.

Public function Const

float

 

GetViewFraction()

Public function Const

float

 

GetViewOffsetFraction()

Public function Const

bool

 

IsRightClickScrolling()

Public function

void

 

RemoveSlot

(
    const TSharedRef< SWidget >& Widge...
)

Removes a slot at the specified location

Public function

void

 

ScrollDescendantIntoView

(
    const TSharedPtr< SWidget >& Widge...,
    bool InAnimateScroll,
    EDescendantScrollDestination InDest...,
    float Padding
)

Attempt to scroll a widget into view, will safely handle non-descendant widgets

Public function

void

 

ScrollToEnd()

Public function

void

 

ScrollToStart()

Public function

void

 

SetAllowOverscroll

(
    EAllowOverscroll NewAllowOverscroll
)

Public function

void

 

SetAnimateWheelScrolling

(
    bool bInAnimateWheelScrolling
)

Public function

void

 

SetConsumeMouseWheel

(
    EConsumeMouseWheel NewConsumeMouseW...
)

Public function

void

 

SetOrientation

(
    EOrientation InOrientation
)

Sets the current orientation of the scrollbox and updates the layout

Public function

void

 

SetScrollBarAlwaysVisible

(
    bool InAlwaysVisible
)

Public function

void

 

SetScrollBarPadding

(
    const FMargin& InPadding
)

Public function

void

 

SetScrollBarRightClickDragAllowed

(
    bool bIsAllowed
)

Public function

void

 

SetScrollBarThickness

(
    FVector2D InThickness
)

Public function

void

 

SetScrollBarTrackAlwaysVisible

(
    bool InAlwaysVisible
)

Public function

void

 

SetScrollBarVisibility

(
    EVisibility InVisibility
)

Public function

void

 

SetScrollOffset

(
    float NewScrollOffset
)

Public function

void

 

SetScrollWhenFocusChanges

(
    EScrollWhenFocusChanges NewScrollWh...
)

Public function

void

 

SetWheelScrollMultiplier

(
    float NewWheelScrollMultiplier
)

Public function Static

FSlot &

 

Slot()

Overridden from SWidget

Name Description

Public function Virtual Const

bool

 

ComputeVolatility()

Recomputes the volatility of the widget.

Protected function Virtual

void

 

OnClippingChanged()

Called when clipping is changed.

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

 

OnFocusChanging

(
    const FWeakWidgetPath& PreviousFoc...,
    const FWidgetPath& NewWidgetPath,
    const FFocusEvent& InFocusEvent
)

Called whenever a focus path is changing on all the widgets within the old and new focus paths

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

FNavigationR...

 

OnNavigation

(
    const FGeometry& MyGeometry,
    const FNavigationEvent& InNavigati...
)

Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

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

void

 

Tick

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

Ticks this widget with Geometry.

Classes

Name

Description

Public struct

FArguments

Public class

FSlot

A Slot that provides layout options for the contents of a scrollable box.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss