Files
UnrealEngineUWP/Engine/Source/Editor/EnvironmentQueryEditor/Private/EnvironmentQueryEditor.h
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

68 lines
2.1 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Toolkits/IToolkitHost.h"
#include "IEnvironmentQueryEditor.h"
#include "AIGraphEditor.h"
class IDetailsView;
class UEdGraph;
class UEnvQuery;
class FEnvironmentQueryEditor : public IEnvironmentQueryEditor, public FAIGraphEditor
{
public:
virtual void RegisterTabSpawners(const TSharedRef<class FTabManager>& TabManager) override;
virtual void UnregisterTabSpawners(const TSharedRef<class FTabManager>& TabManager) override;
void InitEnvironmentQueryEditor( const EToolkitMode::Type Mode, const TSharedPtr< class IToolkitHost >& InitToolkitHost, UEnvQuery* Script );
//~ Begin IToolkit Interface
virtual FName GetToolkitFName() const override;
virtual FText GetBaseToolkitName() const override;
virtual FString GetWorldCentricTabPrefix() const override;
virtual FLinearColor GetWorldCentricTabColorScale() const override;
//~ End IToolkit Interface
//~ Begin IEnvironmentQueryEditor Interface
virtual uint32 GetSelectedNodesCount() const override { return SelectedNodesCount; }
//~ End IEnvironmentQueryEditor Interface
void OnFinishedChangingProperties(const FPropertyChangedEvent& PropertyChangedEvent);
protected:
/** Called when "Save" is clicked for this asset */
virtual void SaveAsset_Execute() override;
private:
/** Create widget for graph editing */
TSharedRef<class SGraphEditor> CreateGraphEditorWidget(UEdGraph* InGraph);
/** Creates all internal widgets for the tabs to point at */
void CreateInternalWidgets();
/** Called when the selection changes in the GraphEditor */
void OnSelectedNodesChanged(const TSet<class UObject*>& NewSelection) override;
/** Spawns the tab with the update graph inside */
TSharedRef<SDockTab> SpawnTab_UpdateGraph(const FSpawnTabArgs& Args);
TSharedRef<SDockTab> SpawnTab_Properties(const FSpawnTabArgs& Args);
private:
/* Query being edited */
UEnvQuery* Query;
/** Property View */
TSharedPtr<class IDetailsView> DetailsView;
uint32 SelectedNodesCount;
/** Graph editor tab */
static const FName EQSUpdateGraphTabId;
static const FName EQSPropertiesTabId;
};