SBox

[SBox](API\Runtime\Slate\Widgets\Layout\SBox) is the simplest layout element.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

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

Include

#include "Widgets/Layout/SBox.h"

Syntax

class SBox : public SPanel

Remarks

SBox is the simplest layout element.

Variables

Name Description

Protected variable

FBoxSlot

 

ChildSlot

Constructors

Name Description

Public function

SBox()

Functions

Name Description

Protected function Const

float

 

ComputeDesiredHeight()

Protected function Const

float

 

ComputeDesiredWidth()

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function

void

 

SetContent

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

See the Content slot.

Public function

void

 

SetHAlign

(
    EHorizontalAlignment HAlign
)

See HAlign argument

Public function

void

 

SetHeightOverride

(
    TAttribute< FOptionalSize > InHeigh...
)

See HeightOverride attribute

Public function

void

 

SetMaxAspectRatio

(
    TAttribute< FOptionalSize > InMaxAs...
)

Public function

void

 

SetMaxDesiredHeight

(
    TAttribute< FOptionalSize > InMaxDe...
)

See MaxDesiredHeight attribute

Public function

void

 

SetMaxDesiredWidth

(
    TAttribute< FOptionalSize > InMaxDe...
)

See MaxDesiredWidth attribute

Public function

void

 

SetMinAspectRatio

(
    TAttribute< FOptionalSize > InMinAs...
)

Public function

void

 

SetMinDesiredHeight

(
    TAttribute< FOptionalSize > InMinDe...
)

See MinDesiredHeight attribute

Public function

void

 

SetMinDesiredWidth

(
    TAttribute< FOptionalSize > InMinDe...
)

See MinDesiredWidth attribute

Public function

void

 

SetPadding

(
    const TAttribute< FMargin >& InPad...
)

See Padding attribute

Public function

void

 

SetVAlign

(
    EVerticalAlignment VAlign
)

See VAlign argument

Public function

void

 

SetWidthOverride

(
    TAttribute< FOptionalSize > InWidth...
)

See WidthOverride attribute

Overridden from SWidget

Name Description

Protected 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

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

FBoxSlot

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