-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathRedHermesGraphNodeEndpointEditorExtension.h
47 lines (35 loc) · 1.24 KB
/
RedHermesGraphNodeEndpointEditorExtension.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) CD PROJEKT S.A.
#pragma once
#include "EditorSubsystem.h"
#include "RedHermesGraphNodeEndpointEditorExtension.generated.h"
class FMenuBuilder;
class FExtender;
class FUICommandList;
class UEdGraph;
class UEdGraphNode;
class UEdGraphPin;
UCLASS()
class REDHERMESGRAPHNODEENDPOINT_API URedHermesGraphNodeEndpointEditorExtension : public UEditorSubsystem
{
GENERATED_BODY()
public:
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnNodeMenuExtensionHookRequestDelegate, const UEdGraphNode*, const UEdGraph*, TSet<FName>&)
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
virtual void Deinitialize() override;
FOnNodeMenuExtensionHookRequestDelegate& OnNodeMenuExtensionHookRequest() { return OnNodeMenuExtensionHookRequestDelegate; }
private:
FOnNodeMenuExtensionHookRequestDelegate OnNodeMenuExtensionHookRequestDelegate;
TSharedRef<FExtender> HandleOnExtendGraphEditorContextMenu(
const TSharedRef<FUICommandList> CommandList,
const UEdGraph* Graph,
const UEdGraphNode* Node,
const UEdGraphPin* Pin,
bool bIsConst);
struct FCopyUrlMenuEntry
{
FText Label;
FText Tooltip;
FString UrlToCopy;
};
static void HandleOnExtendContextMenu(FMenuBuilder& MenuBuilder, TArray<FCopyUrlMenuEntry> MenuEntries);
};