Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Layout
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SScrollBox
- SCommonHierarchicalScrollBox
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
| Type | Name | Description | |
|---|---|---|---|
| EAllowOverscroll | AllowOverscroll | Whether to permit overscroll on this scroll box | |
| float | AmountScrolledWhileRightMouseDown | How much we scrolled while the rmb has been held | |
| bool | BackPadScrolling | Whether to back pad this scroll box, allowing user to scroll backward until child contents are no longer visible | |
| bool: 1 | bAllowsRightClickDragScrolling | ||
| bool: 1 | bAnimateScroll | Should the current scrolling be animated or immediately jump to the desired scroll offer | |
| bool: 1 | bAnimateWheelScrolling | Whether to animate wheel scrolling | |
| TOptional< int32 > | bFingerOwningTouchInteraction | Did the user start an interaction in this list? | |
| bool: 1 | bIsScrolling | Are we actively scrolling right now | |
| bool: 1 | bIsScrollingActiveTimerRegistered | Whether the active timer to update the inertial scroll is registered | |
| bool: 1 | bScrollBarIsExternal | Whether or not the user supplied an external scrollbar to control scrolling. | |
| bool: 1 | bScrollToEnd | If true, will scroll to the end next Tick | |
| bool: 1 | bShowSoftwareCursor | Whether the software cursor should be drawn in the viewport | |
| bool: 1 | bTouchPanningCapture | ||
| FGeometry | CachedGeometry | Cached geometry for use with the active timer | |
| EConsumeMouseWheel | ConsumeMouseWheel | How we should handle scrolling with the mouse wheel | |
| bool | FrontPadScrolling | Whether to front pad this scroll box, allowing user to scroll forward until child contents are no longer visible | |
| SVerticalBox::FSlot * | HorizontalScrollBarSlot | ||
| FInertialScrollManager | InertialScrollManager | Helper object to manage inertial scrolling | |
| double | LastScrollTime | ||
| EDescendantScrollDestination | NavigationDestination | Sets where to scroll a widget to when using explicit navigation or if ScrollWhenFocusChanges is enabled | |
| float | NavigationScrollPadding | The amount of padding to ensure exists between the item being navigated to, at the edge of the scrollbox. | |
| FOnUserScrolled | OnUserScrolled | Fired when the user scrolls the scrollbox | |
| EOrientation | Orientation | The scrolling and stacking orientation. | |
| FOverscroll | Overscroll | The overscroll state management structure. | |
| float | PendingScrollTriggerAmount | The current deviation we've accumulated on scrol, once it passes the trigger amount, we're going to begin scrolling. | |
| TSharedPtr< SScrollBar > | ScrollBar | The scrollbar which controls scrolling for the scrollbox. | |
| const FScrollBarStyle * | ScrollBarStyle | Style resource for the scrollbar | |
| TFunction< void(FGeometry)> | ScrollIntoViewRequest | Scroll into view request. | |
| TSharedPtr< class SScrollPanel > | ScrollPanel | The panel which stacks the child slots | |
| EScrollWhenFocusChanges | ScrollWhenFocusChanges | Scroll behavior when user focus is given to a child widget | |
| FVector2f | SoftwareCursorPosition | The current position of the software cursor | |
| const FScrollBoxStyle * | Style | Style resource for the scrollbox | |
| float | TickScrollDelta | The amount we have scrolled this tick cycle | |
| TSharedPtr< FActiveTimerHandle > | UpdateInertialScrollHandle | ||
| SHorizontalBox::FSlot * | VerticalScrollBarSlot | Vertical scroll bar is stored in horizontal box and vice versa | |
| float | WheelScrollMultiplier | Multiplier applied to each click of the scroll wheel (applied alongside the global scroll amount) |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SScrollBox () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FScopedWidgetSlotArguments | AddSlot () |
Adds a slot to SScrollBox | |
| void | Removes all children from the box | ||
| void | Construct
(
const FArguments& InArgs |
||
| void | |||
| EAllowOverscroll | |||
| TSharedPtr< SWidget > | GetKeyboardFocusableWidget
(
TSharedPtr< SWidget > InWidget |
Returns widget that can receive keyboard focus or nullprt | |
| EOrientation | Get the current orientation of the scrollbox. | ||
| float | |||
| float | Gets the scroll offset of the bottom of the ScrollBox in Slate Units. | ||
| float | |||
| float | |||
| bool | InternalScrollDescendantIntoView
(
const FGeometry& MyGeometry, |
Scrolls or begins scrolling a widget into view, only valid to call when we have layout geometry. | |
| void | |||
| void | |||
| bool | |||
| void | RemoveSlot
(
const TSharedRef< SWidget >& WidgetToRemove |
Removes a slot at the specified location | |
| void | ScrollDescendantIntoView
(
const TSharedPtr< SWidget >& WidgetToFind, |
Attempt to scroll a widget into view, will safely handle non-descendant widgets | |
| void | ScrollToEnd () |
||
| void | |||
| void | SetAllowOverscroll
(
EAllowOverscroll NewAllowOverscroll |
||
| void | SetAnimateWheelScrolling
(
bool bInAnimateWheelScrolling |
||
| void | SetConsumeMouseWheel
(
EConsumeMouseWheel NewConsumeMouseWheel |
||
| void | SetNavigationDestination
(
const EDescendantScrollDestination NewNavigationDestination |
||
| void | SetOrientation
(
EOrientation InOrientation |
Sets the current orientation of the scrollbox and updates the layout | |
| void | SetScrollBarAlwaysVisible
(
bool InAlwaysVisible |
||
| void | SetScrollBarPadding
(
const FMargin& InPadding |
||
| void | SetScrollBarRightClickDragAllowed
(
bool bIsAllowed |
||
| void | SetScrollBarStyle
(
const FScrollBarStyle* InBarStyle |
||
| void | SetScrollBarThickness
(
UE::Slate::FDeprecateVector2DParameter InThickness |
||
| void | SetScrollBarTrackAlwaysVisible
(
bool InAlwaysVisible |
||
| void | SetScrollBarVisibility
(
EVisibility InVisibility |
||
| void | SetScrollOffset
(
float NewScrollOffset |
||
| void | SetScrollWhenFocusChanges
(
EScrollWhenFocusChanges NewScrollWhenFocusChanges |
||
| void | SetStyle
(
const FScrollBoxStyle* InStyle |
||
| void | SetWheelScrollMultiplier
(
float NewWheelScrollMultiplier |
||
| FSlot::FSlotArguments | Slot () |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| bool | Recomputes the volatility of the widget. | ||
| void | Called when clipping is changed. | ||
| FCursorReply | OnCursorQuery
(
const FGeometry& MyGeometry, |
The system asks each widget under the mouse to provide a cursor. This event is bubbled. | |
| void | OnFocusChanging
(
const FWeakWidgetPath& PreviousFocusPath, |
Called whenever a focus path is changing on all the widgets within the old and new focus paths | |
| FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it. | |
| FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was release within it. | |
| void | OnMouseCaptureLost
(
const FCaptureLostEvent& CaptureLostEvent |
Called when this widget had captured the mouse, but that capture has been revoked for some reason. | |
| void | OnMouseEnter
(
const FGeometry& MyGeometry, |
The system will use this event to notify a widget that the cursor has entered it. | |
| void | OnMouseLeave
(
const FPointerEvent& MouseEvent |
The system will use this event to notify a widget that the cursor has left it. | |
| FReply | OnMouseMove
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse moved within it. | |
| FReply | OnMouseWheel
(
const FGeometry& MyGeometry, |
Called when the mouse wheel is spun. This event is bubbled. | |
| FNavigationReply | OnNavigation
(
const FGeometry& MyGeometry, |
Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events. | |
| int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. | |
| FReply | OnPreviewMouseButtonDown
(
const FGeometry& MyGeometry, |
Just like OnMouseButtonDown, but tunnels instead of bubbling. | |
| FReply | OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | |
| void | Ticks this widget with Geometry. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments | |||
| FSlot | A Slot that provides layout options for the contents of a scrollable box. |
Typedefs
| Name | Description |
|---|---|
| FScopedWidgetSlotArguments |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| FMargin | ScrollBarPadding | ScrollBarPadding is deprecated, Use SetScrollBarPadding |