// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Containers/Array.h" #include "CoreMinimal.h" #include "EdGraph/EdGraphSchema.h" #include "GraphEditor.h" #include "HAL/PlatformMath.h" #include "Math/Vector2D.h" #include "Templates/SharedPointer.h" #include "Types/SlateEnums.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/Layout/SBorder.h" class SEditableTextBox; class SGraphActionMenu; class UAIGraphNode; class UEdGraph; class UEdGraphPin; struct FEdGraphSchemaAction; struct FGraphActionListBuilderBase; ///////////////////////////////////////////////////////////////////////////////////////////////// class AIGRAPH_API SGraphEditorActionMenuAI : public SBorder { public: SLATE_BEGIN_ARGS(SGraphEditorActionMenuAI) : _GraphObj( static_cast(NULL) ) ,_GraphNode(NULL) , _NewNodePosition( FVector2D::ZeroVector ) , _AutoExpandActionMenu( false ) , _SubNodeFlags(0) {} SLATE_ARGUMENT( UEdGraph*, GraphObj ) SLATE_ARGUMENT( UAIGraphNode*, GraphNode) SLATE_ARGUMENT( FVector2D, NewNodePosition ) SLATE_ARGUMENT( TArray, DraggedFromPins ) SLATE_ARGUMENT( SGraphEditor::FActionMenuClosed, OnClosedCallback ) SLATE_ARGUMENT( bool, AutoExpandActionMenu ) SLATE_ARGUMENT( int32, SubNodeFlags) SLATE_END_ARGS() void Construct( const FArguments& InArgs ); ~SGraphEditorActionMenuAI(); TSharedRef GetFilterTextBox(); protected: UEdGraph* GraphObj; UAIGraphNode* GraphNode; TArray DraggedFromPins; FVector2D NewNodePosition; bool AutoExpandActionMenu; int32 SubNodeFlags; SGraphEditor::FActionMenuClosed OnClosedCallback; TSharedPtr GraphActionMenu; void OnActionSelected( const TArray< TSharedPtr >& SelectedAction, ESelectInfo::Type InSelectionType ); /** Callback used to populate all actions list in SGraphActionMenu */ void CollectAllActions(FGraphActionListBuilderBase& OutAllActions); };