Navigation
API > API/Runtime > API/Runtime/UMG
Allows you to place content with a desired size and have it scale to meet the constraints placed on this box's alloted area. If you needed to have a background image scale to fill an area but not become distorted with different aspect ratios, or if you need to auto fit some text to an area, this is the control for you.
- Single Child
- Aspect Ratio
| Name | UScaleBox |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/ScaleBox.h |
| Include Path | #include "Components/ScaleBox.h" |
Syntax
UCLASS (Config=Engine, MinimalAPI)
class UScaleBox : public UContentWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UPanelWidget → UContentWidget → UScaleBox
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UScaleBox
(
const FObjectInitializer& ObjectInitializer |
Components/ScaleBox.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| IgnoreInheritedScale | bool | Optional bool to ignore the inherited scale. | Components/ScaleBox.h |
|
| Stretch | TEnumAsByte< EStretch::Type > | The stretching rule to apply when content is stretched | Components/ScaleBox.h |
|
| StretchDirection | TEnumAsByte< EStretchDirection::Type > | Controls in what direction content can be scaled | Components/ScaleBox.h |
|
| UserSpecifiedScale | float | Optional scale that can be specified by the User. Used only for UserSpecified stretching. | Components/ScaleBox.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EStretch::Type GetStretch() |
Components/ScaleBox.h | ||
EStretchDirection::Type GetStretchDirection() |
Components/ScaleBox.h | ||
float GetUserSpecifiedScale() |
Components/ScaleBox.h | ||
bool IsIgnoreInheritedScale() |
Components/ScaleBox.h | ||
void SetIgnoreInheritedScale
(
bool bInIgnoreInheritedScale |
Components/ScaleBox.h |
|
|
void SetStretch
(
EStretch::Type InStretch |
Components/ScaleBox.h |
|
|
void SetStretchDirection
(
EStretchDirection::Type InStretchDirection |
Components/ScaleBox.h |
|
|
void SetUserSpecifiedScale
(
float InUserSpecifiedScale |
Components/ScaleBox.h |
|
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/ScaleBox.h | |
virtual void OnDesignerChanged
(
const FDesignerChangedEventArgs& EventArgs |
Components/ScaleBox.h | ||
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/ScaleBox.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/ScaleBox.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Components/ScaleBox.h | ||
virtual void Serialize
(
FArchive& Ar |
Components/ScaleBox.h |
Protected
Overridden from UPanelWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UClass * GetSlotClass() |
UPanelWidget. | Components/ScaleBox.h | |
virtual void OnSlotAdded
(
UPanelSlot* Slot |
Components/ScaleBox.h | ||
virtual void OnSlotRemoved
(
UPanelSlot* Slot |
Components/ScaleBox.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/ScaleBox.h |