Navigation
API > API/Runtime > API/Runtime/Slate
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-]
| Name | SWrapBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Layout/SWrapBox.h |
| Include Path | #include "Widgets/Layout/SWrapBox.h" |
Syntax
class SWrapBox : public SPanel
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SWrapBox
- FSlateControlledConstruction → SWidget → SPanel → SWrapBox
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SWrapBox() |
Widgets/Layout/SWrapBox.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SWrapBox() |
Widgets/Layout/SWrapBox.h |
Classes
| Name | Remarks |
|---|---|
| FChildArranger | |
| FSlot | A slot that support alignment of content and padding |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FScopedWidgetSlotArguments | TPanelChildren< FSlot >::FScopedWidgetSlotArguments | Widgets/Layout/SWrapBox.h | |
| PrivateParentType | SPanel | Widgets/Layout/SWrapBox.h | |
| PrivateThisType | SWrapBox | Widgets/Layout/SWrapBox.h | |
| Super | SPanel | Widgets/Layout/SWrapBox.h | |
| ThisClass | SWrapBox | Widgets/Layout/SWrapBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bUseAllottedSize | bool | If true the box will have a preferred size equal to its alloted size | Widgets/Layout/SWrapBox.h | |
| HAlign | TSlateAttribute< EHorizontalAlignment > | How to distribute the elements among any extra space in a given row | Widgets/Layout/SWrapBox.h | |
| InnerSlotPadding | FVector2D | When two slots end up sharing a border, this will put that much padding between then, but otherwise wont. | Widgets/Layout/SWrapBox.h | |
| Orientation | EOrientation | Determines if the wrap box needs to arrange the slots left-to-right or top-to-bottom. | Widgets/Layout/SWrapBox.h | |
| PreferredSize | TSlateAttribute< float > | How wide or long, dependently of the orientation, this panel should appear to be. | Widgets/Layout/SWrapBox.h | |
| Slots | TPanelChildren< FSlot > | The slots that contain this panel's children. | Widgets/Layout/SWrapBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedWidgetSlotArguments AddSlot() |
Widgets/Layout/SWrapBox.h | ||
void ClearChildren() |
Widgets/Layout/SWrapBox.h | ||
void Construct
(
const FArguments& InArgs |
Widgets/Layout/SWrapBox.h | ||
int32 RemoveSlot
(
const TSharedRef< SWidget >& SlotWidget |
Removes a slot from this box panel which contains the specified SWidget | Widgets/Layout/SWrapBox.h | |
void SetHorizontalAlignment
(
TAttribute< EHorizontalAlignment > InHAlignment |
How to distribute the elements among any extra space in a given row | Widgets/Layout/SWrapBox.h | |
void SetInnerSlotPadding
(
FVector2D InInnerSlotPadding |
See InnerSlotPadding Attribute | Widgets/Layout/SWrapBox.h | |
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 | Widgets/Layout/SWrapBox.h | |
void SetUseAllottedSize
(
bool bInUseAllottedSize |
When true, use the WrapSize property to determine where to wrap to the next line. | Widgets/Layout/SWrapBox.h | |
void SetWrapSize
(
TAttribute< float > InWrapSize |
Set the size at which the wrap panel should wrap its content. | Widgets/Layout/SWrapBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/Layout/SWrapBox.h | ||
virtual FChildren * GetChildren() |
Widgets/Layout/SWrapBox.h | ||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Layout/SWrapBox.h | ||
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Widgets/Layout/SWrapBox.h |
Overridden from FSlateControlledConstruction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FSlateWidgetClassData & GetWidgetClass() |
Widgets/Layout/SWrapBox.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FSlateWidgetClassData & GetPrivateWidgetClass() |
Widgets/Layout/SWrapBox.h | ||
static SLATE_API void PrivateRegisterAttributes
(
FSlateAttributeInitializer& |
Widgets/Layout/SWrapBox.h | ||
static FSlot::FSlotArguments Slot() |
Widgets/Layout/SWrapBox.h | ||
static const FSlateWidgetClassData & StaticWidgetClass() |
Widgets/Layout/SWrapBox.h |