You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
----------------------------------------------------------------- MetaSounds Interfaces Checkpoint 2: - Version up source archetypes to become two interfaces: channel interfaces (mono/stereo) & base source namespace - Clean-up Interface panel to support namespacing better - Fix bugs with assuming interfaces are always and the only base namespace members - Allow namespacing for any arbitrary interface member - Add lock icon to clarify what interface members cannot be modified individually (i.e. cannot add, remove, or rename them as they are interface members) - Organize members alphabetically #jira UE-135000 #rnx #rb phil.popp #preflight 61a7d1079c77d610079303ec #p4v-cherrypick 18344347 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18413245 via CL 18413381 via CL 18413401 via CL 18434953 via CL 18437303 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18437360 by rob gay in ue5-release-engine-test branch]
94 lines
2.7 KiB
C++
94 lines
2.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "GraphEditor.h"
|
|
#include "EdGraph/EdGraph.h"
|
|
#include "EdGraph/EdGraphPin.h"
|
|
#include "EdGraph/EdGraphSchema.h"
|
|
#include "Layout/Margin.h"
|
|
#include "Layout/Visibility.h"
|
|
#include "SGraphActionMenu.h"
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Widgets/Input/SEditableTextBox.h"
|
|
#include "Widgets/Layout/SBorder.h"
|
|
#include "Widgets/SWidget.h"
|
|
#include "Widgets/Views/SExpanderArrow.h"
|
|
|
|
class SEditableTextBox;
|
|
class SGraphActionMenu;
|
|
class UEdGraph;
|
|
struct FCustomExpanderData;
|
|
|
|
namespace Metasound
|
|
{
|
|
namespace Editor
|
|
{
|
|
// Custom expander to specify our desired padding
|
|
class SMetasoundActionMenuExpanderArrow : public SExpanderArrow
|
|
{
|
|
SLATE_BEGIN_ARGS(SMetasoundActionMenuExpanderArrow)
|
|
{
|
|
}
|
|
|
|
SLATE_ATTRIBUTE(float, IndentAmount)
|
|
SLATE_END_ARGS()
|
|
|
|
public:
|
|
void Construct(const FArguments& InArgs, const FCustomExpanderData& ActionMenuData);
|
|
|
|
private:
|
|
FMargin GetCustomIndentPadding() const;
|
|
|
|
TWeakPtr<FEdGraphSchemaAction> ActionPtr;
|
|
};
|
|
|
|
class SMetasoundActionMenu : public SBorder
|
|
{
|
|
public:
|
|
/** Delegate for the OnCloseReason event which is always raised when the SMetasoundActionMenu closes */
|
|
DECLARE_DELEGATE_ThreeParams(FClosedReason, bool /*bActionExecuted*/, bool /*bContextSensitiveChecked*/, bool /*bGraphPinContext*/);
|
|
|
|
SLATE_BEGIN_ARGS(SMetasoundActionMenu)
|
|
: _Graph(static_cast<UEdGraph*>(nullptr))
|
|
, _NewNodePosition(FVector2D::ZeroVector)
|
|
, _AutoExpandActionMenu(false)
|
|
{
|
|
}
|
|
SLATE_ARGUMENT(UEdGraph*, Graph)
|
|
SLATE_ARGUMENT(FVector2D, NewNodePosition)
|
|
SLATE_ARGUMENT(TArray<UEdGraphPin*>, DraggedFromPins)
|
|
SLATE_ARGUMENT(SGraphEditor::FActionMenuClosed, OnClosedCallback)
|
|
SLATE_ARGUMENT(bool, AutoExpandActionMenu)
|
|
SLATE_EVENT(FClosedReason, OnCloseReason)
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
~SMetasoundActionMenu();
|
|
|
|
TSharedRef<SEditableTextBox> GetFilterTextBox();
|
|
|
|
protected:
|
|
void OnActionSelected(const TArray<TSharedPtr<FEdGraphSchemaAction>>& SelectedAction, ESelectInfo::Type InSelectionType);
|
|
|
|
TSharedRef<SWidget> OnCreateWidgetForAction(struct FCreateWidgetForActionData* const InCreateData);
|
|
|
|
/** Callback used to populate all actions list in SGraphActionMenu */
|
|
void CollectAllActions(FGraphActionListBuilderBase& OutAllActions);
|
|
|
|
private:
|
|
UEdGraph* Graph = nullptr;
|
|
bool bAutoExpandActionMenu = false;
|
|
bool bActionExecuted = false;
|
|
|
|
TArray<UEdGraphPin*> DraggedFromPins;
|
|
FVector2D NewNodePosition = FVector2D::ZeroVector;
|
|
|
|
SGraphEditor::FActionMenuClosed OnClosedCallback;
|
|
FClosedReason OnCloseReasonCallback;
|
|
|
|
TSharedPtr<SGraphActionMenu> GraphActionMenu;
|
|
};
|
|
} // namespace Editor
|
|
} // namespace Metasound
|