SSplitter

[SSplitter](API\Runtime\Slate\Widgets\Layout\SSplitter) divides its allotted area into N segments, where N is the number of children it has.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Layout/SSplitter.h"

Syntax

class SSplitter : public SPanel

Remarks

SSplitter divides its allotted area into N segments, where N is the number of children it has. It allows the users to resize the children along the splitters axis: that is, horizontally or vertically.

Variables

Name Description

Protected variable

bool

 

bIsResizing

Protected variable

TPanelChildren<...

 

Children

Protected variable

float

 

HitDetectionSplitterHandleSize

Protected variable

int32

 

HoveredHandleIndex

Protected variable

float

 

MinSplitterChildLength

The user is not allowed to make any of the splitter's children smaller than this.

Protected variable

FOnGetMaxSlotSi...

 

OnGetMaxSlotSize

Protected variable

FSimpleDelegate

 

OnSplitterFinishedResizing

Protected variable

EOrientation

 

Orientation

Protected variable

float

 

PhysicalSplitterHandleSize

The thickness of the grip area that the user uses to resize a splitter

Protected variable

ESplitterResize...

 

ResizeMode

Protected variable

const FSplitter...

 

Style

Constructors

Name Description

Public function

SSplitter()

Functions

Name Description

Public function

FSlot &

 

AddSlot

(
    int32 AtIndex
)

Add a slot to the splitter at the specified index Sample usage: SomeSplitter->AddSlot() [ SNew(SSomeWidget) ];

Protected function

float

 

ClampChild

(
    float ProposedSize
)

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Protected function Static

void

 

FindAllResizeableSlotsAfterHandle

(
    int32 DraggedHandle,
    const TPanelChildren< FSlot >& Chi...,
    TArray< int32 >& OutSlotIndicies
)

Protected function Static

int32

 

FindResizeableSlotAfterHandle

(
    int32 DraggedHandle,
    const TPanelChildren< FSlot >& Chi...
)

Given the index of the dragged handle and the children, find a child below/right_of the dragged handle that can be resized

Protected function Static

int32

 

FindResizeableSlotBeforeHandle

(
    int32 DraggedHandle,
    const TPanelChildren< FSlot >& Chi...
)

Given the index of the dragged handle and the children, find a child above/left_of of the dragged handle that can be resized.

Protected function Static

int32

 

GetHandleBeingResizedFromMousePosition

(
    float PhysicalSplitterHandleSize,
    float HitDetectionSplitterHandleSiz...,
    FVector2D LocalMousePos,
    const TArray< FLayoutGeometry >& C...
)

Given a mouse position within the splitter, figure out which resize handle we are hovering (if any).

Public function Const

EOrientation

 

GetOrientation()

Protected function

void

 

HandleResizingByMousePosition

(
    EOrientation Orientation,
    const float PhysicalSplitterHandleS...,
    const ESplitterResizeMode::Type Res...,
    int32 DraggedHandle,
    const FVector2D& LocalMousePos,
    TPanelChildren< FSlot >& Children,
    const TArray< FLayoutGeometry >& C...
)

Resizes the children based on user input.

Protected function

void

 

HandleResizingBySize

(
    EOrientation Orientation,
    const float PhysicalSplitterHandleS...,
    const ESplitterResizeMode::Type Res...,
    int32 DraggedHandle,
    const FVector2D& DesiredSize,
    TPanelChildren< FSlot >& Children,
    const TArray< FLayoutGeometry >& C...
)

Protected function

void

 

HandleResizingDelta

(
    EOrientation Orientation,
    const float PhysicalSplitterHandleS...,
    const ESplitterResizeMode::Type Res...,
    int32 DraggedHandle,
    float Delta,
    TPanelChildren< FSlot >& Children,
    const TArray< FLayoutGeometry >& C...
)

Public function

void

 

RemoveAt

(
    int32 IndexToRemove
)

Remove the child at IndexToRemove

Public function

void

 

SetOrientation

(
    EOrientation NewOrientation
)

Change the orientation of the splitter

Public function Static

FSlot &

 

Slot()

Public function

SSplitter::F...

 

SlotAt

(
    int32 SlotIndex
)

Get the slot at the specified index

Overridden from SWidget

Name Description

Public function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user.

Public function Virtual

FChildren &#...

 

GetChildren()

All widgets must provide a way to access their children in a layout-agnostic way.

Public function Virtual Const

void

 

OnArrangeChildren

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Panels arrange their children in a space described by the AllottedGeometry parameter.

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

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
)

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

 

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 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.

Classes

Name

Description

Public struct

FArguments

Public class

FSlot

Enums

Name

Description

Public enum

ESizeRule

How should a child's size be determined

Typedefs

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