UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SizeBox.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"
9#include "SizeBox.generated.h"
10
11class SBox;
12
20UCLASS(MinimalAPI)
22{
24
25protected:
27
28public:
29
30 UE_DEPRECATED(5.1, "Direct access to WidthOverride is deprecated. Please use the getter or setter.")
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetWidthOverride", Category="Child Layout", meta=( editcondition="bOverride_WidthOverride" ))
33 float WidthOverride;
34
35 UE_DEPRECATED(5.1, "Direct access to HeightOverride is deprecated. Please use the getter or setter.")
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetHeightOverride", Category="Child Layout", meta=( editcondition="bOverride_HeightOverride" ))
38 float HeightOverride;
39
40 UE_DEPRECATED(5.1, "Direct access to MinDesiredWidth is deprecated. Please use the getter or setter.")
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMinDesiredWidth", Category="Child Layout", meta=( editcondition="bOverride_MinDesiredWidth" ))
43 float MinDesiredWidth;
44
45 UE_DEPRECATED(5.1, "Direct access to MinDesiredHeight is deprecated. Please use the getter or setter.")
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMinDesiredHeight", Category="Child Layout", meta=( editcondition="bOverride_MinDesiredHeight" ))
48 float MinDesiredHeight;
49
50 UE_DEPRECATED(5.1, "Direct access to MaxDesiredWidth is deprecated. Please use the getter or setter.")
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMaxDesiredWidth", Category="Child Layout", meta=( editcondition="bOverride_MaxDesiredWidth" ))
53 float MaxDesiredWidth;
54
55 UE_DEPRECATED(5.1, "Direct access to MaxDesiredHeight is deprecated. Please use the getter or setter.")
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMaxDesiredHeight", Category="Child Layout", meta=( editcondition="bOverride_MaxDesiredHeight" ))
58 float MaxDesiredHeight;
59
60 UE_DEPRECATED(5.1, "Direct access to MinAspectRatio is deprecated. Please use the getter or setter.")
62 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMinAspectRatio", Category = "Child Layout", meta = (editcondition = "bOverride_MinAspectRatio"))
63 float MinAspectRatio;
64
65 UE_DEPRECATED(5.1, "Direct access to MaxAspectRatio is deprecated. Please use the getter or setter.")
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter="SetMaxAspectRatio", Category="Child Layout", meta=( editcondition="bOverride_MaxAspectRatio" ))
68 float MaxAspectRatio;
69
70 UE_DEPRECATED(5.1, "Direct access to bOverride_WidthOverride is deprecated. Please use the SetWidthOverride or ClearWidthOverride.")
72 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
73 uint8 bOverride_WidthOverride : 1;
74
75 UE_DEPRECATED(5.1, "Direct access to bOverride_HeightOverride is deprecated. Please use the SetHeightOverride or ClearHeightOverride.")
77 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
78 uint8 bOverride_HeightOverride : 1;
79
80 UE_DEPRECATED(5.1, "Direct access to bOverride_MinDesiredWidth is deprecated. Please use the SetMinDesiredWidth or ClearMinDesiredWidth.")
82 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
83 uint8 bOverride_MinDesiredWidth : 1;
84
85 UE_DEPRECATED(5.1, "Direct access to bOverride_MinDesiredHeight is deprecated. Please use the SetMinDesiredHeight or ClearMinDesiredHeight.")
87 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
88 uint8 bOverride_MinDesiredHeight : 1;
89
90 UE_DEPRECATED(5.1, "Direct access to bOverride_MaxDesiredWidth is deprecated. Please use the SetMaxDesiredWidth or ClearMaxDesiredWidth.")
92 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
93 uint8 bOverride_MaxDesiredWidth : 1;
94
95 UE_DEPRECATED(5.1, "Direct access to bOverride_MaxDesiredHeight is deprecated. Please use the SetMaxDesiredHeight or ClearMaxDesiredHeight.")
97 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
98 uint8 bOverride_MaxDesiredHeight : 1;
99
100 UE_DEPRECATED(5.1, "Direct access to bOverride_MinAspectRatio is deprecated. Please use the SetMinAspectRatio or ClearMinAspectRatio.")
102 UPROPERTY(EditAnywhere, Category="Child Layout", meta=(InlineEditConditionToggle))
103 uint8 bOverride_MinAspectRatio : 1;
104
105 UE_DEPRECATED(5.1, "Direct access to bOverride_MaxAspectRatio is deprecated. Please use the SetMaxAspectRatio or ClearMaxAspectRatio .")
107 UPROPERTY(EditAnywhere, Category = "Child Layout", meta=(InlineEditConditionToggle))
108 uint8 bOverride_MaxAspectRatio : 1;
109
110
111public:
112
114 UMG_API float GetWidthOverride() const;
115
117 UMG_API bool IsWidthOverride() const;
118
120 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
122
123 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
124 UMG_API void ClearWidthOverride();
125
127 UMG_API float GetHeightOverride() const;
128
130 UMG_API bool IsHeightOverride() const;
131
133 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
135
136 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
137 UMG_API void ClearHeightOverride();
138
140 UMG_API float GetMinDesiredWidth() const;
141
143 UMG_API bool IsMinDesiredWidthOverride() const;
144
146 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
148
149 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
150 UMG_API void ClearMinDesiredWidth();
151
153 UMG_API float GetMinDesiredHeight() const;
154
156 UMG_API bool IsMinDesiredHeightOverride() const;
157
159 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
161
162 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
163 UMG_API void ClearMinDesiredHeight();
164
166 UMG_API float GetMaxDesiredWidth() const;
167
169 UMG_API bool IsMaxDesiredWidthOverride() const;
170
172 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
174
175 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
176 UMG_API void ClearMaxDesiredWidth();
177
179 UMG_API float GetMaxDesiredHeight() const;
180
182 UMG_API bool IsMaxDesiredHeightOverride() const;
183
185 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
187
188 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
189 UMG_API void ClearMaxDesiredHeight();
190
192 UMG_API float GetMinAspectRatio() const;
193
195 UMG_API bool IsMinAspectRatioOverride() const;
196
197 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
199
200 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
201 UMG_API void ClearMinAspectRatio();
202
204 UMG_API float GetMaxAspectRatio() const;
205
207 UMG_API bool IsMaxAspectRatioOverride() const;
208
209 UFUNCTION(BlueprintCallable, Category="Layout|Size Box")
211
212 UFUNCTION(BlueprintCallable, Category = "Layout|Size Box")
213 UMG_API void ClearMaxAspectRatio();
214
215
216 // UWidget interface
217 UMG_API virtual void SynchronizeProperties() override;
218 // End of UWidget interface
219
220 // UVisual interface
221 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
222 // End of UVisual interface
223
224#if WITH_EDITOR
225 UMG_API virtual const FText GetPaletteCategory() override;
226#endif
227
228protected:
229
230 // UPanelWidget
231 UMG_API virtual UClass* GetSlotClass() const override;
232 UMG_API virtual void OnSlotAdded(UPanelSlot* Slot) override;
233 UMG_API virtual void OnSlotRemoved(UPanelSlot* Slot) override;
234 // End UPanelWidget
235
236 // UWidget interface
237 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
238 // End of UWidget interface
239};
#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
uint32 Size
Definition VulkanMemory.cpp:4034
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Text.h:385
Definition SBox.h:29
SLATE_API void SetMaxDesiredHeight(TAttribute< FOptionalSize > InMaxDesiredHeight)
Definition SBox.cpp:109
SLATE_API void SetMaxDesiredWidth(TAttribute< FOptionalSize > InMaxDesiredWidth)
Definition SBox.cpp:104
SLATE_API void SetHeightOverride(TAttribute< FOptionalSize > InHeightOverride)
Definition SBox.cpp:89
SLATE_API void SetMinDesiredWidth(TAttribute< FOptionalSize > InMinDesiredWidth)
Definition SBox.cpp:94
SLATE_API void SetMaxAspectRatio(TAttribute< FOptionalSize > InMaxAspectRatio)
Definition SBox.cpp:119
SLATE_API void SetMinDesiredHeight(TAttribute< FOptionalSize > InMinDesiredHeight)
Definition SBox.cpp:99
SLATE_API void SetWidthOverride(TAttribute< FOptionalSize > InWidthOverride)
Definition SBox.cpp:84
SLATE_API void SetMinAspectRatio(TAttribute< FOptionalSize > InMinAspectRatio)
Definition SBox.cpp:114
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Class.h:3793
Definition ContentWidget.h:13
Definition PanelSlot.h:13
Definition SizeBox.h:22
TSharedPtr< SBox > MySizeBox
Definition SizeBox.h:26