Navigation
API > API/Runtime > API/Runtime/UMG
A widget that allows you to specify the size it reports to have and desire. Not all widgets report a desired size that you actually desire. Wrapping them in a SizeBox lets you have the Size Box force them to be a particular size.
- Single Child
- Fixed Size
| Name | USizeBox |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/SizeBox.h |
| Include Path | #include "Components/SizeBox.h" |
Syntax
UCLASS (MinimalAPI)
class USizeBox : public UContentWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UPanelWidget → UContentWidget → USizeBox
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USizeBox
(
const FObjectInitializer& ObjectInitializer |
Components/SizeBox.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bOverride_HeightOverride | uint8 | Components/SizeBox.h |
|
|
| bOverride_MaxAspectRatio | uint8 | Components/SizeBox.h |
|
|
| bOverride_MaxDesiredHeight | uint8 | Components/SizeBox.h |
|
|
| bOverride_MaxDesiredWidth | uint8 | Components/SizeBox.h |
|
|
| bOverride_MinAspectRatio | uint8 | Components/SizeBox.h |
|
|
| bOverride_MinDesiredHeight | uint8 | Components/SizeBox.h |
|
|
| bOverride_MinDesiredWidth | uint8 | Components/SizeBox.h |
|
|
| bOverride_WidthOverride | uint8 | Components/SizeBox.h |
|
|
| HeightOverride | float | When specified, ignore the content's desired size and report the HeightOverride as the Box's desired height. | Components/SizeBox.h |
|
| MaxAspectRatio | float | Components/SizeBox.h |
|
|
| MaxDesiredHeight | float | When specified, will report the MaxDesiredHeight if smaller than the content's desired height. | Components/SizeBox.h |
|
| MaxDesiredWidth | float | When specified, will report the MaxDesiredWidth if smaller than the content's desired width. | Components/SizeBox.h |
|
| MinAspectRatio | float | Components/SizeBox.h |
|
|
| MinDesiredHeight | float | When specified, will report the MinDesiredHeight if larger than the content's desired height. | Components/SizeBox.h |
|
| MinDesiredWidth | float | When specified, will report the MinDesiredWidth if larger than the content's desired width. | Components/SizeBox.h |
|
| WidthOverride | float | When specified, ignore the content's desired size and report the WidthOverride as the Box's desired width. | Components/SizeBox.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearHeightOverride() |
Components/SizeBox.h |
|
|
void ClearMaxAspectRatio() |
Components/SizeBox.h |
|
|
void ClearMaxDesiredHeight() |
Components/SizeBox.h |
|
|
void ClearMaxDesiredWidth() |
Components/SizeBox.h |
|
|
void ClearMinAspectRatio() |
Components/SizeBox.h |
|
|
void ClearMinDesiredHeight() |
Components/SizeBox.h |
|
|
void ClearMinDesiredWidth() |
Components/SizeBox.h |
|
|
void ClearWidthOverride() |
Components/SizeBox.h |
|
|
float GetHeightOverride() |
Components/SizeBox.h | ||
float GetMaxAspectRatio() |
Components/SizeBox.h | ||
float GetMaxDesiredHeight() |
Components/SizeBox.h | ||
float GetMaxDesiredWidth() |
Components/SizeBox.h | ||
float GetMinAspectRatio() |
Components/SizeBox.h | ||
float GetMinDesiredHeight() |
Components/SizeBox.h | ||
float GetMinDesiredWidth() |
Components/SizeBox.h | ||
float GetWidthOverride() |
Components/SizeBox.h | ||
bool IsHeightOverride() |
Components/SizeBox.h | ||
bool IsMaxAspectRatioOverride() |
Components/SizeBox.h | ||
bool IsMaxDesiredHeightOverride() |
Components/SizeBox.h | ||
bool IsMaxDesiredWidthOverride() |
Components/SizeBox.h | ||
bool IsMinAspectRatioOverride() |
Components/SizeBox.h | ||
bool IsMinDesiredHeightOverride() |
Components/SizeBox.h | ||
bool IsMinDesiredWidthOverride() |
Components/SizeBox.h | ||
bool IsWidthOverride() |
Components/SizeBox.h | ||
void SetHeightOverride
(
float InHeightOverride |
When specified, ignore the content's desired size and report the HeightOverride as the Box's desired height. | Components/SizeBox.h |
|
void SetMaxAspectRatio
(
float InMaxAspectRatio |
Components/SizeBox.h |
|
|
void SetMaxDesiredHeight
(
float InMaxDesiredHeight |
When specified, will report the MaxDesiredHeight if smaller than the content's desired height. | Components/SizeBox.h |
|
void SetMaxDesiredWidth
(
float InMaxDesiredWidth |
When specified, will report the MaxDesiredWidth if smaller than the content's desired width. | Components/SizeBox.h |
|
void SetMinAspectRatio
(
float InMinAspectRatio |
Components/SizeBox.h |
|
|
void SetMinDesiredHeight
(
float InMinDesiredHeight |
When specified, will report the MinDesiredHeight if larger than the content's desired height. | Components/SizeBox.h |
|
void SetMinDesiredWidth
(
float InMinDesiredWidth |
When specified, will report the MinDesiredWidth if larger than the content's desired width. | Components/SizeBox.h |
|
void SetWidthOverride
(
float InWidthOverride |
When specified, ignore the content's desired size and report the WidthOverride as the Box's desired width. | Components/SizeBox.h |
|
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/SizeBox.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/SizeBox.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/SizeBox.h |
Protected
Overridden from UPanelWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UClass * GetSlotClass() |
UPanelWidget. | Components/SizeBox.h | |
virtual void OnSlotAdded
(
UPanelSlot* Slot |
Components/SizeBox.h | ||
virtual void OnSlotRemoved
(
UPanelSlot* Slot |
Components/SizeBox.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/SizeBox.h |