50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "SCompoundWidget.h"
|
|
#include "AudioBuffer/ChannelNode.h"
|
|
|
|
class SButton;
|
|
class STextBlock;
|
|
class SMenuAnchor;
|
|
/**
|
|
*
|
|
*/
|
|
class ARONA_API SChannelNode : public SCompoundWidget
|
|
{
|
|
public:
|
|
enum class EChannelNodeType
|
|
{
|
|
InputNode,
|
|
OutputNode,
|
|
};
|
|
|
|
SLATE_BEGIN_ARGS(SChannelNode)
|
|
{
|
|
}
|
|
SLATE_ARGUMENT(EChannelNodeType, ChannelNodeType)
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
/** Constructs this widget with InArgs */
|
|
void Construct(const FArguments& InArgs, FChannelNode* InChannelNode, FChannelInterface* InNodeOwner, int32 NodeNameIndex);
|
|
|
|
FChannelNode::FChannelNodeDelegate OnRightClickedDelegate;
|
|
private:
|
|
void ShowNodeSelectMenu();
|
|
TSharedRef<SWidget> CreateNodeSelectMenu();
|
|
void OnMenuNodeSelected(FChannelNode* Node);
|
|
FString GetNodeName(int32 NodeNameIndex = -1);
|
|
|
|
FChannelInterface* NodeOwner = nullptr;
|
|
FChannelNode* ChannelNode = nullptr;
|
|
EChannelNodeType ChannelNodeType = EChannelNodeType::InputNode;
|
|
|
|
TSharedPtr<SButton> ChangeNodeButton;
|
|
TSharedPtr<STextBlock> NodeNameTextBlock;
|
|
TSharedPtr<STextBlock> PortTextBlock;
|
|
int32 NodeIndex = -1;
|
|
};
|