Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Public/IActorEditorContextClient.h
patrick enfedaque b697e201cf ActorEditorContext
- Add FScopedActorEditorContextFromActor which pushes a new context based on the provided actor (will be used in next Foliage CL)
- Implemented through IActorEditorContextClient(s) with EActorEditorContextAction::InitializeContextFromActor
- Remove Adding of DataLayers in ActorPartitionSubsystem as this will be done by the DataLayerEditorSubsystem through the active editor context
- Properly support ContextBundles in ActorPartitionSubsystem to generate unique name
- Cleanup APartitionActor naming API + Labels

#rb richard.malo
#rnx

[CL 27309490 by patrick enfedaque in ue5-main branch]
2023-08-23 12:21:45 -04:00

40 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/SWidget.h"
/**
* Public interface for Actor Editor Context Clients
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnActorEditorContextClientChanged, struct IActorEditorContextClient*);
class UWorld;
class AActor;
struct FActorEditorContextClientDisplayInfo
{
FActorEditorContextClientDisplayInfo() : Brush(nullptr) {}
FString Title;
const FSlateBrush* Brush;
};
enum class EActorEditorContextAction
{
ApplyContext,
ResetContext,
PushContext,
PopContext,
InitializeContextFromActor,
};
struct IActorEditorContextClient
{
virtual void OnExecuteActorEditorContextAction(UWorld* InWorld, const EActorEditorContextAction& InType, AActor* InActor = nullptr) = 0;
virtual bool GetActorEditorContextDisplayInfo(UWorld* InWorld, FActorEditorContextClientDisplayInfo& OutDiplayInfo) const = 0;
virtual bool CanResetContext(UWorld* InWorld) const = 0;
virtual TSharedRef<SWidget> GetActorEditorContextWidget(UWorld* InWorld) const = 0;
virtual FOnActorEditorContextClientChanged& GetOnActorEditorContextClientChanged() = 0;
};