Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Public/IActorEditorContextClient.h
Richard Malo 296dd8a20c - Actor Editor Context : System can register themselves to the ActorEditorContextSubsystem and provide the necessary to apply their context value to newly created actors and optionally show a widget in the viewport.
- Refactored viewport's current level combobox and added "current data layers" in data layer outliner and "current folder" in world outliner to use this system.
- Can optionally be hidden from viewport using advanced flag in ULevelEditorViewportSettings.
#robomerge FNNC
#rb patrick.enfedaque
#preflight 6227604a7077eb04cf696c33

[CL 19302351 by Richard Malo in ue5-main branch]
2022-03-08 09:40:27 -05:00

39 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
};
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;
};