UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RetainerBox.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 "RetainerBox.generated.h"
10
11class SRetainerWidget;
14
25UCLASS(MinimalAPI)
27{
29
30protected:
31 UE_DEPRECATED(5.2, "Direct access to bRetainRender is deprecated. Please use the getter or setter.")
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Setter = "SetRetainRendering", Getter = "IsRetainRendering", BlueprintSetter = "SetRetainRendering", Category = "Render Rules")
33 bool bRetainRender = true;
34
35public:
36 UE_DEPRECATED(5.2, "Direct access to RenderOnInvalidation is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime.")
41 UPROPERTY(EditAnywhere, BlueprintReadOnly, Getter = "IsRenderOnInvalidation", Category = "Render Rules", meta = (EditCondition = bRetainRender))
42 bool RenderOnInvalidation;
43
44 UE_DEPRECATED(5.2, "Direct access to RenderOnPhase is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime.")
48 UPROPERTY(EditAnywhere, BlueprintReadOnly, Getter = "IsRenderOnPhase", Category = "Render Rules", meta = (EditCondition = bRetainRender))
49 bool RenderOnPhase;
50
51 UE_DEPRECATED(5.2, "Direct access to Phase is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime.")
59 UPROPERTY(EditAnywhere, BlueprintReadOnly, Getter, Category="Render Rules", meta=(UIMin=0, ClampMin=0))
60 int32 Phase;
61
62 UE_DEPRECATED(5.2, "Direct access to PhaseCount is deprecated. Please use the getter. Note that this property is only set at construction and is not modifiable at runtime.")
71 UPROPERTY(EditAnywhere, BlueprintReadOnly, Getter, Category="Render Rules", meta=(UIMin=1, ClampMin=1))
72 int32 PhaseCount;
73
74public:
75
79 UFUNCTION(BlueprintCallable, Category="Retainer")
80 UMG_API void SetRenderingPhase(int32 RenderPhase, int32 TotalPhases);
81
85 UFUNCTION(BlueprintCallable, Category="Retainer")
86 UMG_API void RequestRender();
87
91 UFUNCTION(BlueprintCallable, Category="Retainer|Effect")
92 UMG_API UMaterialInstanceDynamic* GetEffectMaterial() const;
93
97 UFUNCTION(BlueprintCallable, Category="Retainer|Effect")
98 UMG_API void SetEffectMaterial(UMaterialInterface* EffectMaterial);
99
103 UFUNCTION(BlueprintCallable, Category="Retainer|Effect")
104 UMG_API void SetTextureParameter(FName TextureParameter);
105
109 UFUNCTION(BlueprintCallable, Category = "Retainer")
110 UMG_API void SetRetainRendering(bool bInRetainRendering);
111
115 UMG_API bool IsRetainRendering() const;
116
120 UMG_API int32 GetPhase() const;
121
125 UMG_API int32 GetPhaseCount() const;
126
130 UMG_API bool IsRenderOnInvalidation() const;
131
135 UMG_API bool IsRenderOnPhase() const;
136
137 UMG_API virtual void ReleaseSlateResources(bool bReleaseChildren) override;
138
139#if WITH_EDITOR
140 UMG_API virtual const FText GetPaletteCategory() override;
141#endif
142
143 UMG_API FGeometry GetCachedAllottedGeometry() const;
144
145protected:
146
147 UE_DEPRECATED(5.2, "Direct access to EffectMaterial is deprecated. Please use the getter or setter.")
156 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter = "GetEffectMaterialInterface", Setter, BlueprintSetter = "SetEffectMaterial", Category = "Effect")
158
159 UE_DEPRECATED(5.2, "Direct access to TextureParameter is deprecated. Please use the getter or setter.")
163 UPROPERTY(EditAnywhere, BlueprintReadWrite, Getter, Setter, BlueprintSetter = "SetTextureParameter", Category="Effect")
164 FName TextureParameter;
165
166#if WITH_EDITORONLY_DATA
170 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Effect", meta = (EditCondition = bRetainRender))
172#endif
173
174 //~ Begin UPanelWidget interface
175 UMG_API virtual void OnSlotAdded(UPanelSlot* Slot) override;
176 UMG_API virtual void OnSlotRemoved(UPanelSlot* Slot) override;
177 //~ End UPanelWidget interface
178
179 //~ Begin UWidget interface
180 UMG_API virtual TSharedRef<SWidget> RebuildWidget() override;
181 UMG_API virtual void SynchronizeProperties() override;
182 //~ End of UWidget interface
183
184 //~ Begin UObject interface
185#if WITH_EDITOR
186 UMG_API virtual bool CanEditChange(const FProperty* InProperty) const override;
187#endif
188 //~ End UObject interface
189
190 // Initialize RenderOnInvalidation in the constructor before the SWidget is constructed.
191 UMG_API void InitRenderOnInvalidation(bool InRenderOnInvalidation);
192
193 // Initialize RenderOnPhase in the constructor before the SWidget is constructed.
194 UMG_API void InitRenderOnPhase(bool InRenderOnPhase);
195
196 // Initialize Phase in the constructor before the SWidget is constructed.
197 UMG_API void InitPhase(int32 InPhase);
198
199 // Initialize PhaseCount in the constructor before the SWidget is constructed.
200 UMG_API void InitPhaseCount(int32 InPhaseCount);
201public:
205 UMG_API const FName& GetTextureParameter() const;
206
210 UMG_API const UMaterialInterface* GetEffectMaterialInterface() const;
211
212protected:
214};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
const bool
Definition NetworkReplayStreaming.h:178
#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
void SetTextureParameter(FRHIBatchedShaderParameters &BatchedParameters, const FShaderResourceParameter &Parameter, FRHITexture *TextureRHI)
Definition ShaderParameterUtils.h:77
Definition NameTypes.h:617
Definition UnrealType.h:174
Definition Text.h:385
Definition SRetainerWidget.h:40
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition ContentWidget.h:13
Definition MaterialInstanceDynamic.h:15
Definition MaterialInterface.h:296
Definition PanelSlot.h:13
Definition RetainerBox.h:27
TSharedPtr< class SRetainerWidget > MyRetainerWidget
Definition RetainerBox.h:213
Definition Geometry.h:40
Definition ObjectPtr.h:488