UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ScaleBox.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "Widgets/SWidget.h"
10#include "ScaleBox.generated.h"
11
20UCLASS(config=Engine, MinimalAPI)
22{
24
25public:
26
27 UE_DEPRECATED(5.2, "Direct access to Stretch is deprecated. Please use the getter or setter.")
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Getter, BlueprintSetter = "SetStretch", Category = "Stretching")
30 TEnumAsByte<EStretch::Type> Stretch;
31
32 UE_DEPRECATED(5.2, "Direct access to StretchDirection is deprecated. Please use the getter or setter.")
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Getter, BlueprintSetter = "SetStretchDirection", Category = "Stretching")
35 TEnumAsByte<EStretchDirection::Type> StretchDirection;
36
37 UE_DEPRECATED(5.2, "Direct access to UserSpecifiedScale is deprecated. Please use the getter or setter.")
39 UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Getter, BlueprintSetter = "SetUserSpecifiedScale", Category = "Stretching")
40 float UserSpecifiedScale;
41
42 UE_DEPRECATED(5.2, "Direct access to IgnoreInheritedScale is deprecated. Please use the getter or setter.")
44 UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter, Getter = "IsIgnoreInheritedScale", BlueprintSetter = "SetIgnoreInheritedScale", Category = "Stretching")
45 bool IgnoreInheritedScale;
46
47public:
48 UFUNCTION(BlueprintCallable, Category = "Appearance")
49 UMG_API void SetStretch(EStretch::Type InStretch);
50
51 UMG_API EStretch::Type GetStretch() const;
52
53 UFUNCTION(BlueprintCallable, Category = "Appearance")
54 UMG_API void SetStretchDirection(EStretchDirection::Type InStretchDirection);
55
56 UMG_API EStretchDirection::Type GetStretchDirection() const;
57
58 UFUNCTION(BlueprintCallable, Category = "Appearance")
59 UMG_API void SetUserSpecifiedScale(float InUserSpecifiedScale);
60
61 UMG_API float GetUserSpecifiedScale() const;
62
63 UFUNCTION(BlueprintCallable, Category = "Appearance")
64 UMG_API void SetIgnoreInheritedScale(bool bInIgnoreInheritedScale);
65
66 UMG_API bool IsIgnoreInheritedScale() const;
67
68public:
69
70 // UWidget interface
71 UMG_API virtual void SynchronizeProperties() override;
72 // End of UWidget interface
73
74 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
75
76#if WITH_EDITOR
77 UMG_API virtual const FText GetPaletteCategory() override;
78 UMG_API virtual bool CanEditChange(const FProperty* InProperty) const override;
80#endif
81
82 UMG_API virtual void Serialize(FArchive& Ar) override;
83
84protected:
85
86 // UPanelWidget
87 UMG_API virtual UClass* GetSlotClass() const override;
88 UMG_API virtual void OnSlotAdded(UPanelSlot* Slot) override;
89 UMG_API virtual void OnSlotRemoved(UPanelSlot* Slot) override;
90 // End UPanelWidget
91
92protected:
94
95#if WITH_EDITOR
97#endif
98
99protected:
100 // UWidget interface
101 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
102 // End of UWidget interface
103};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition Engine.Build.cs:7
Definition Archive.h:1208
Definition UnrealType.h:174
Definition Text.h:385
Definition EnumAsByte.h:22
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Class.h:3793
Definition ContentWidget.h:13
Definition PanelSlot.h:13
Definition ScaleBox.h:22
TSharedPtr< SScaleBox > MyScaleBox
Definition ScaleBox.h:93
Definition SScaleBox.h:19
Definition SScaleBox.h:33
Definition Optional.h:131