SWrapBox

With EOrientation::Orient_Horizontal Arranges widgets left-to-right.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Layout/SWrapBox.h"

Syntax

class SWrapBox : public SPanel

Remarks

With EOrientation::Orient_Horizontal Arranges widgets left-to-right. When the widgets exceed the PreferredSize the SWrapBox will place widgets on the next line.

Illustration: +Preferred Size | [-----][-|-] [][[]| [--------|] [] | With EOrientation::Orient_Vertical Arranges widgets top-to-bottom. When the widgets exceed the PreferredSize the SVerticalWrapBox will place widgets on the next line.

Illustration: [___] [___] [-1-] [-3-]

[___] [___] [-2-] [-4-]

[___] ==============================>-----Preferred Size [-3-]

Constructors

Name Description

Public function

SWrapBox()

Functions

Name Description

Public function

FSlot &

 

AddSlot()

Public function

void

 

ClearChildren()

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function

int32

 

RemoveSlot

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

Removes a slot from this box panel which contains the specified SWidget

Public function

void

 

SetInnerSlotPadding

(
    FVector2D InInnerSlotPadding
)

See InnerSlotPadding Attribute

Public function

void

 

SetOrientation

(
    EOrientation InOrientation
)

Set the Orientation to determine if the wrap box needs to arrange the slots left-to-right or top-to-bottom

Public function

void

 

SetUseAllottedSize

(
    bool bInUseAllottedSize
)

When true, use the WrapSize property to determine where to wrap to the next line.

Public function

void

 

SetWrapSize

(
    const TAttribute< float >& InWrapS...
)

Set the size at which the wrap panel should wrap its content.

Public function Static

FSlot &

 

Slot()

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

void

 

Tick

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

Ticks this widget with Geometry.

Classes

Name

Description

Public struct

FArguments

Public class

FChildArranger

Public class

FSlot

A slot that support alignment of content and padding

Deprecated Functions

Name Description

Public function

void

 

SetUseAllottedWidth

(
    bool bInUseAllottedWidth
)

Deprecated, please use SetUseAllottedSize() instead

Public function

void

 

SetWrapWidth

(
    const TAttribute< float >& InWrapW...
)

Deprecated, please use SetWrapSize() instead

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