UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UIComponent.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 "FieldNotificationDeclaration.h"
12
13#include "UIComponent.generated.h"
14
15class UEdGraph;
16class UWidget;
17class SWidget;
18
23UCLASS(Abstract, MinimalAPI, CustomFieldNotify)
25{
27
28public:
30 {
31 UMG_API virtual void ForEachField(const UClass* Class, TFunctionRef<bool(UE::FieldNotification::FFieldId FielId)> Callback) const override;
32 };
36 UMG_API void Initialize(UWidget* Target);
37
42 UMG_API void PreConstruct(bool bIsDesignTime);
43
47 UMG_API void Construct();
48
52 UMG_API void Destruct();
53
57 UMG_API virtual void GraphRenamed(UEdGraph* Graph, const FName& OldName, const FName& NewName);
58
63 UMG_API TWeakObjectPtr<UWidget> GetOwner() const;
64
70 UMG_API virtual TSharedRef<SWidget> RebuildWidgetWithContent(TSharedRef<SWidget> Content);
71
72 //~ Begin INotifyFieldValueChanged Interface
74 UMG_API virtual bool RemoveFieldValueChangedDelegate(UE::FieldNotification::FFieldId InFieldId, FDelegateHandle InHandle) override final;
75 UMG_API virtual int32 RemoveAllFieldValueChangedDelegates(FDelegateUserObjectConst InUserObject) override final;
76 UMG_API virtual int32 RemoveAllFieldValueChangedDelegates(UE::FieldNotification::FFieldId InFieldId, FDelegateUserObjectConst InUserObject) override final;
77 UMG_API virtual void BroadcastFieldValueChanged(UE::FieldNotification::FFieldId InFieldId) override final;
78 UMG_API virtual const UE::FieldNotification::IClassDescriptor& GetFieldNotificationDescriptor() const override;
79 //~ End INotifyFieldValueChanged Interface
80
81protected:
82
83 UMG_API virtual void OnInitialize();
84 UMG_API virtual void OnPreConstruct(bool bIsDesignTime);
85 UMG_API virtual void OnConstruct();
86 UMG_API virtual void OnDestruct();
87 UMG_API virtual void OnGraphRenamed(UEdGraph* Graph, const FName& OldName, const FName& NewName);
88
89private:
90 UPROPERTY(transient, DuplicateTransient)
93
94 bool bInitialized = false;
95};
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
const void * FDelegateUserObjectConst
Definition IDelegateInstance.h:108
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
void Construct(const FArguments &InArgs)
Definition IDelegateInstance.h:14
Definition NameTypes.h:617
Definition INotifyFieldValueChanged.h:23
Definition SWidget.h:165
Definition DelegateSignatureImpl.inl:310
Definition AssetRegistryState.h:50
Definition SharedPointer.h:153
Definition Class.h:3793
Definition FieldNotificationDelegate.h:26
Definition EdGraph.h:68
Definition Object.h:95
Definition UIComponent.h:25
Definition Widget.h:217
Definition WeakObjectPtrTemplates.h:25
Definition FieldNotificationId.h:16
Definition IFieldNotificationClassDescriptor.h:12