Files
UnrealEngineUWP/Engine/Source/Editor/AudioEditor/Classes/SoundCueGraph/SoundCueGraphNode.h
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

60 lines
2.0 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "SoundCueGraph/SoundCueGraphNode_Base.h"
#include "SoundCueGraphNode.generated.h"
class UEdGraphPin;
class USoundNode;
UCLASS(MinimalAPI)
class USoundCueGraphNode : public USoundCueGraphNode_Base
{
GENERATED_UCLASS_BODY()
/** The SoundNode this represents */
UPROPERTY(VisibleAnywhere, instanced, Category=Sound)
USoundNode* SoundNode;
/** Set the SoundNode this represents (also assigns this to the SoundNode in Editor)*/
AUDIOEDITOR_API void SetSoundNode(USoundNode* InSoundNode);
/** Fix up the node's owner after being copied */
AUDIOEDITOR_API void PostCopyNode();
/** Create a new input pin for this node */
AUDIOEDITOR_API void CreateInputPin();
/** Add an input pin to this node and recompile the SoundCue */
AUDIOEDITOR_API void AddInputPin();
/** Remove a specific input pin from this node and recompile the SoundCue */
AUDIOEDITOR_API void RemoveInputPin(UEdGraphPin* InGraphPin);
/** Estimate the width of this Node from the length of its title */
AUDIOEDITOR_API int32 EstimateNodeWidth() const;
/** Checks whether an input can be added to this node */
AUDIOEDITOR_API bool CanAddInputPin() const;
// USoundCueGraphNode_Base interface
virtual void CreateInputPins() override;
// End of USoundCueGraphNode_Base interface
// UEdGraphNode interface
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
virtual void PrepareForCopying() override;
virtual void GetContextMenuActions(const FGraphNodeContextMenuBuilder& Context) const override;
virtual FText GetTooltipText() const override;
virtual FString GetDocumentationExcerptName() const override;
// End of UEdGraphNode interface
// UObject interface
virtual void PostLoad() override;
virtual void PostEditImport() override;
virtual void PostDuplicate(bool bDuplicateForPIE) override;
// End of UObject interface
private:
/** Make sure the soundnode is owned by the SoundCue */
void ResetSoundNodeOwner();
};