Navigation
API > API/Runtime > API/Runtime/Slate
SBox is the simplest layout element.
| Name | SBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Layout/SBox.h |
| Include Path | #include "Widgets/Layout/SBox.h" |
Syntax
class SBox : public SPanel
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SBox
- FSlateControlledConstruction → SWidget → SPanel → SBox
Derived Classes
SBox derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SBox() |
Widgets/Layout/SBox.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SBox() |
Widgets/Layout/SBox.h |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FBoxOneChildSlot |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PrivateParentType | SPanel | Widgets/Layout/SBox.h | |
| PrivateThisType | SBox | Widgets/Layout/SBox.h | |
| Super | SPanel | Widgets/Layout/SBox.h | |
| ThisClass | SBox | Widgets/Layout/SBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| HeightOverride | TSlateAttribute< FOptionalSize > | When specified, ignore the content's desired size and report the.HeightOverride as the Box's desired height. | Widgets/Layout/SBox.h | |
| MaxAspectRatio | TSlateAttribute< FOptionalSize > | Widgets/Layout/SBox.h | ||
| MaxDesiredHeight | TSlateAttribute< FOptionalSize > | When specified, will report the MaxDesiredHeight if smaller than the content's desired height. | Widgets/Layout/SBox.h | |
| MaxDesiredWidth | TSlateAttribute< FOptionalSize > | When specified, will report the MaxDesiredWidth if smaller than the content's desired width. | Widgets/Layout/SBox.h | |
| MinAspectRatio | TSlateAttribute< FOptionalSize > | Widgets/Layout/SBox.h | ||
| MinDesiredHeight | TSlateAttribute< FOptionalSize > | When specified, will report the MinDesiredHeight if larger than the content's desired height. | Widgets/Layout/SBox.h | |
| MinDesiredWidth | TSlateAttribute< FOptionalSize > | When specified, will report the MinDesiredWidth if larger than the content's desired width. | Widgets/Layout/SBox.h | |
| WidthOverride | TSlateAttribute< FOptionalSize > | When specified, ignore the content's desired size and report the.WidthOverride as the Box's desired width. | Widgets/Layout/SBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Widgets/Layout/SBox.h | ||
void SetContent
(
const TSharedRef< SWidget >& InContent |
See the Content slot. | Widgets/Layout/SBox.h | |
void SetHAlign
(
EHorizontalAlignment HAlign |
See HAlign argument | Widgets/Layout/SBox.h | |
void SetHeightOverride
(
TAttribute< FOptionalSize > InHeightOverride |
See HeightOverride attribute | Widgets/Layout/SBox.h | |
void SetMaxAspectRatio
(
TAttribute< FOptionalSize > InMaxAspectRatio |
Widgets/Layout/SBox.h | ||
void SetMaxDesiredHeight
(
TAttribute< FOptionalSize > InMaxDesiredHeight |
See MaxDesiredHeight attribute | Widgets/Layout/SBox.h | |
void SetMaxDesiredWidth
(
TAttribute< FOptionalSize > InMaxDesiredWidth |
See MaxDesiredWidth attribute | Widgets/Layout/SBox.h | |
void SetMinAspectRatio
(
TAttribute< FOptionalSize > InMinAspectRatio |
Widgets/Layout/SBox.h | ||
void SetMinDesiredHeight
(
TAttribute< FOptionalSize > InMinDesiredHeight |
See MinDesiredHeight attribute | Widgets/Layout/SBox.h | |
void SetMinDesiredWidth
(
TAttribute< FOptionalSize > InMinDesiredWidth |
See MinDesiredWidth attribute | Widgets/Layout/SBox.h | |
void SetPadding
(
TAttribute< FMargin > InPadding |
See Padding attribute | Widgets/Layout/SBox.h | |
void SetVAlign
(
EVerticalAlignment VAlign |
See VAlign argument | Widgets/Layout/SBox.h | |
void SetWidthOverride
(
TAttribute< FOptionalSize > InWidthOverride |
See WidthOverride attribute | Widgets/Layout/SBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FChildren * GetChildren() |
Widgets/Layout/SBox.h | ||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Layout/SBox.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Layout/SBox.h |
Overridden from FSlateControlledConstruction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FSlateWidgetClassData & GetWidgetClass() |
Widgets/Layout/SBox.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float ComputeDesiredHeight() |
Widgets/Layout/SBox.h | ||
float ComputeDesiredWidth() |
Widgets/Layout/SBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/Layout/SBox.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FSlateWidgetClassData & GetPrivateWidgetClass() |
Widgets/Layout/SBox.h | ||
static SLATE_API void PrivateRegisterAttributes
(
FSlateAttributeInitializer& |
Widgets/Layout/SBox.h | ||
static const FSlateWidgetClassData & StaticWidgetClass() |
Widgets/Layout/SBox.h |