// 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 CreateNodeSelectMenu(); void OnMenuNodeSelected(FChannelNode* Node); FString GetNodeName(int32 NodeNameIndex = -1); FChannelInterface* NodeOwner = nullptr; FChannelNode* ChannelNode = nullptr; EChannelNodeType ChannelNodeType = EChannelNodeType::InputNode; TSharedPtr ChangeNodeButton; TSharedPtr NodeNameTextBlock; TSharedPtr PortTextBlock; int32 NodeIndex = -1; };