EM_Task/UnrealEd/Public/BaseWidgetBlueprint.h
Boshuang Zhao 5144a49c9b add
2026-02-13 16:18:33 +08:00

37 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Engine/Blueprint.h"
#include "BaseWidgetBlueprint.generated.h"
UCLASS(Abstract)
class UNREALED_API UBaseWidgetBlueprint: public UBlueprint
{
GENERATED_UCLASS_BODY()
public:
#if WITH_EDITORONLY_DATA
/** A tree of the widget templates to be created */
UPROPERTY()
class UWidgetTree* WidgetTree;
#endif
virtual void PostLoad() override;
/**
* Returns collection of widgets that represent the 'source' (user edited) widgets for this
* blueprint - avoids calling virtual functions on instances and is therefore safe to use
* throughout compilation.
*/
TArray<class UWidget*> GetAllSourceWidgets();
TArray<const class UWidget*> GetAllSourceWidgets() const;
/** Identical to GetAllSourceWidgets, but as an algorithm */
void ForEachSourceWidget(TFunctionRef<void(class UWidget*)> Fn);
void ForEachSourceWidget(TFunctionRef<void(class UWidget*)> Fn) const;
private:
void ForEachSourceWidgetImpl(TFunctionRef<void(class UWidget*)> Fn) const;
};