Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Public/SGraphEditorActionMenu.h
bryan sefcik 8cc129f2b6 IWYU Pass 1 - Engine/Source/Editor/...
#jira
#preflight 6306736ac85b7fef22be7751

[CL 21558583 by bryan sefcik in ue5-main branch]
2022-08-24 22:45:13 -04:00

63 lines
1.8 KiB
C++

// 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/PlatformCrt.h"
#include "Math/Vector2D.h"
#include "Templates/SharedPointer.h"
#include "Types/SlateEnums.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/Input/SEditableTextBox.h"
#include "Widgets/Layout/SBorder.h"
class SEditableTextBox;
class SGraphActionMenu;
class UEdGraph;
class UEdGraphPin;
struct FEdGraphSchemaAction;
struct FGraphActionListBuilderBase;
/////////////////////////////////////////////////////////////////////////////////////////////////
class GRAPHEDITOR_API SGraphEditorActionMenu : public SBorder
{
public:
SLATE_BEGIN_ARGS( SGraphEditorActionMenu )
: _GraphObj( static_cast<UEdGraph*>(NULL) )
, _NewNodePosition( FVector2D::ZeroVector )
, _AutoExpandActionMenu( false )
{}
SLATE_ARGUMENT( UEdGraph*, GraphObj )
SLATE_ARGUMENT( FVector2D, NewNodePosition )
SLATE_ARGUMENT( TArray<UEdGraphPin*>, DraggedFromPins )
SLATE_ARGUMENT( SGraphEditor::FActionMenuClosed, OnClosedCallback )
SLATE_ARGUMENT( bool, AutoExpandActionMenu )
SLATE_END_ARGS()
void Construct( const FArguments& InArgs );
~SGraphEditorActionMenu();
TSharedRef<SEditableTextBox> GetFilterTextBox();
protected:
UEdGraph* GraphObj;
TArray<UEdGraphPin*> DraggedFromPins;
FVector2D NewNodePosition;
bool AutoExpandActionMenu;
SGraphEditor::FActionMenuClosed OnClosedCallback;
TSharedPtr<SGraphActionMenu> GraphActionMenu;
void OnActionSelected( const TArray< TSharedPtr<FEdGraphSchemaAction> >& SelectedAction, ESelectInfo::Type InSelectionType );
/** Callback used to populate all actions list in SGraphActionMenu */
void CollectAllActions(FGraphActionListBuilderBase& OutAllActions);
};