SGraphNode

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

GraphEditor

Header

/Engine/Source/Editor/GraphEditor/Public/SGraphNode.h

Include

#include "SGraphNode.h"

Syntax

class SGraphNode : public SNodePanel::SNode

Variables

Name Description

Protected variable

bool

 

bProvidedComplexTooltip

Is the current tooltip a complex one that should be dropped when the tooltip is no longer displayed?

Protected variable

bool

 

bRenameIsPending

Is a rename operation pending.

Protected variable

FVector2D

 

CachedUnscaledPosition

Caches true position of node

Protected variable

FSlateColor

 

ErrorColor

Used to set the error color

Protected variable

FString

 

ErrorMsg

Used to report errors on the node

Protected variable

TSharedPtr< cla...

 

ErrorReporting

Error handling widget

Protected variable

FCurveHandle

 

FadeCurve

Protected variable

UEdGraphNode &#...

 

GraphNode

The GraphNode being observed by this widget

Protected variable

FLinearColor

 

IconColor

Cached icon color for the node

Protected variable

TSharedPtr< SIn...

 

InlineEditableText

Used to display the name of the node and allow renaming of the node

Protected variable

TArray< TShared...

 

InputPins

Input pin widgets on this node

Protected variable

TAttribute< boo...

 

IsEditable

Is this node editable

Protected variable

TSharedPtr< SVe...

 

LeftNodeBox

The area where input pins reside

Protected variable

SGraphEditor::F...

 

OnDisallowedPinConnection

Called when the user generates a warning tooltip because a connection was invalid

Protected variable

FSingleNodeEven...

 

OnDoubleClick

Protected variable

FOnNodeTextComm...

 

OnTextCommitted

Called whenever the text on the node is committed interactively by the user

Protected variable

FOnNodeVerifyTe...

 

OnVerifyTextCommit

Called whenever the text on the node is being committed interactively by the user, validates the string for commit

Protected variable

TArray< TShared...

 

OutputPins

Output pin widgets on this node

Protected variable

TWeakPtr< SGrap...

 

OwnerGraphPanelPtr

The GraphPanel within in which this node resides.

Protected variable

TSharedPtr< SVe...

 

RightNodeBox

The area where output pins reside

Protected variable

const UGraphEdi...

 

Settings

Cached pointer to graph editor settings

Protected variable

FCurveSequence

 

SpawnAnim

Protected variable

FCurveHandle

 

ZoomCurve

Constructors

Name Description

Protected function

SGraphNode()

Functions

Name Description

Protected function Virtual

void

 

AddPin

(
    const TSharedRef< SGraphPin >& Pin...
)

Add a new pin to this graph node. The pin must be newly created.

Protected function

TSharedRef< ...

 

AddPinButtonContent

(
    FText PinText,
    FText PinTooltipText,
    bool bRightSide,
    FString DocumentationExcerpt,
    TSharedPtr< SToolTip > CustomToolti...
)

Creates widget for an Add pin button, which can then be added to the node

Protected function Const

EVisibility

 

AdvancedViewArrowVisibility()

Returns visibility of AdvancedViewButton

Public function

void

 

ApplyRename()

Sets node into rename state if supported

Protected function Static

bool

 

CanAllowInteractionUsingDragDropOp

(
    const UEdGraphNode* GraphNodeP...,
    const TSharedPtr< FActorDragDropOp ...
)

Check whether drag and drop functionality is permitted on the given node

Protected function

void

 

CreateAdvancedViewArrow

(
    TSharedPtr< SVerticalBox > MainBox
)

Create button to show/hide advanced pins

Create widget to show/hide advanced pins

Protected function Virtual

void

 

CreateBelowPinControls

(
    TSharedPtr< SVerticalBox > MainBox
)

Override this to add widgets below the pins but above advanced view arrow.

Protected function Virtual

void

 

CreateBelowWidgetControls

(
    TSharedPtr< SVerticalBox > MainBox
)

Override this to add widgets below the node and pins.

Protected function Virtual

void

 

CreateInputSideAddButton

(
    TSharedPtr< SVerticalBox > InputBox
)

Override this to create a button to add pins on the input side of the node

Protected function Virtual

TSharedRef< ...

 

CreateNodeContentArea()

Create the inner node content area, including the left/right pin boxes

Protected function Virtual

void

 

CreateOutputSideAddButton

(
    TSharedPtr< SVerticalBox > OutputBo...
)

Override this to create a button to add pins on the output side of the node

Protected function Virtual Const

TSharedPtr< ...

 

CreatePinWidget

(
    UEdGraphPin* Pin
)

Hook that allows derived classes to supply their own SGraphPin derivatives for any pin.

Public function Virtual

void

 

CreatePinWidgets()

Create the widgets for pins on the node

Public function Virtual

void

 

CreateStandardPinWidget

(
    UEdGraphPin* Pin
)

Create a single pin widget

Protected function Virtual

TSharedRef< ...

 

CreateTitleRightWidget()

Optionally create a widget to dock to the right in the title bar of the node.

Protected function Virtual

TSharedRef< ...

 

CreateTitleWidget

(
    TSharedPtr< SNodeTitle > NodeTitle
)

Public function Const

TSharedPtr< ...

 

FindWidgetForPin

(
    UEdGraphPin* ThePin
)

Protected function Const

const FSlate...

 

GetAdvancedViewArrow()

Up when shown, down when hidden

Public function Const

FLinearColor

 

GetColorAndOpacity()

Protected function Virtual Const

FSlateColor

 

GetCommentColor()

Return the desired comment bubble color

Protected function Virtual

TSharedPtr< ...

 

GetComplexTooltip()

Override this to provide support for an 'expensive' tooltip widget that is only built on demand

Public function Const

FVector2D

 

GetContentScale()

Public function Const

EGraphRender...

 

GetCurrentLOD()

Returns the current Node LOD or Highest LOD if unable to query

Public function Const

FString

 

GetEditableNodeTitle()

Public function Const

FText

 

GetEditableNodeTitleAsText()

Protected function

TSharedPtr< ...

 

GetEnabledStateWidget()

Returns the widget to use for the enabled state of the node

Protected function Const

FSlateColor

 

GetErrorColor()

Helper function to set the error color for the node

Protected function Const

FString

 

GetErrorMessage()

Helper function to get any error text for the node

Protected function Const

FText

 

GetErrorMsgToolTip()

Function to get error description string

Public function Virtual Const

TSharedPtr< ...

 

GetHoveredPin

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Find the pin that is hovered.

Public function Virtual Const

const FSlate...

 

GetNodeBodyBrush()

Public function Const

FSlateColor

 

GetNodeBodyColor()

Public function Const

FSlateColor

 

GetNodeCommentColor()

Public function Const

UEdGraphNode...

 

GetNodeObj()

Public function Const

FSlateColor

 

GetNodeTitleColor()

Public function Const

FSlateColor

 

GetNodeTitleIconColor()

Public function Const

FLinearColor

 

GetNodeTitleTextColor()

Public function Const

FText

 

GetNodeTooltip()

Public function Virtual

TSharedRef< ...

 

GetNodeUnderMouse

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Public function Const

TSharedPtr< ...

 

GetOwnerPanel()

Public function Const

FLinearColor

 

GetPinLabelColorAndOpacity()

Public function Const

void

 

GetPins

(
    TArray< TSharedRef< SWidget > >& A...
)

Get all the pins found on this node.

Public function Const

void

 

GetPins

(
    TSet< TSharedRef< SWidget > >& All...
)

Get all the pins found on this node.

Public function Virtual Const

FSlateRect

 

GetTitleRect()

Return rect of the title area

Public function Const

FVector2D

 

GetUnscaledPosition()

Gets the unscaled position of the node from the last tick

Public function

void

 

InvalidateGraphData()

Called when ed graph data is cleared, indicating this widget can no longer safely access GraphNode - forwards call to owned pins:

Protected function Virtual Const

EVisibility

 

IsAddPinButtonVisible()

Checks whether Add pin button should currently be visible

Protected function Const

ECheckBoxSta...

 

IsAdvancedViewChecked()

Hidden == unchecked, shown == checked

Public function Virtual Const

bool

 

IsHidingPinWidgets()

Returns true if the node is hiding its pins

Protected function Virtual Const

bool

 

IsNameReadOnly()

Helper function to check if node can be renamed

Public function Virtual Const

bool

 

IsNodeEditable()

Returns if widget is editable, additionally considers if the owning graph is read only

Public function Const

bool

 

IsRenamePending()

Returns true if a rename is pending on this node

Protected function Const

bool

 

IsSelectedExclusively()

Checks if the node is the only node selected

Public function Const

FVector2D

 

NodeCoordToGraphCoord

(
    const FVector2D& PanelSpaceCoordin...
)

Given a coordinate in SGraphNode space, return the same coordinate in graph space while taking zoom and panning of the parent graph into account

Public function Const

void

 

NotifyDisallowedPinConnection

(
    const UEdGraphPin* PinA,
    const UEdGraphPin* PinB
)

Called from drag drop code when a disallowed connection is hovered

Protected function Virtual

FReply

 

OnAddPin()

Callback function executed when Add pin button is clicked

Protected function

void

 

OnAdvancedViewChanged

(
    const ECheckBoxState NewCheckedStat...
)

Show/hide advanced view

Public function Virtual

void

 

OnCommentBubbleToggled

(
    bool bInCommentBubbleVisible
)

Called when the node's comment bubble is toggled

Public function Virtual

void

 

OnCommentTextCommitted

(
    const FText& NewComment,
    ETextCommit::Type CommitInfo
)

Called to replace this nodes comment text

Protected function

void

 

OnNameTextCommited

(
    const FText& InText,
    ETextCommit::Type CommitInfo
)

Called when text is committed on the node

Protected function

bool

 

OnVerifyNameTextChanged

(
    const FText& InText,
    FText& OutErrorMessage
)

Called when text is being committed to check for validity

Public function

void

 

PlaySpawnEffect()

Protected function Virtual Const

void

 

PopulateMetaTag

(
    FGraphNodeMetaData* TagMeta
)

Populate a meta data tag with information about this graph node

Protected function Const

void

 

PositionThisNodeBetweenOtherNodes

(
    const TMap< UObject*, TSharedR...,
    TSet< UEdGraphNode* >& Previo...,
    TSet< UEdGraphNode* >& NextNo...,
    float HeightAboveWire
)

Protected function Const

void

 

PositionThisNodeBetweenOtherNodes

(
    const FVector2D& PrevPos,
    const FVector2D& NextPos,
    float HeightAboveWire
)

Protected function Const

void

 

PositionThisNodeBetweenOtherNodes

(
    const TMap< UObject*, TSharedR...,
    UEdGraphNode* PreviousNode,
    UEdGraphNode* NextNode,
    float HeightAboveWire
)

Public function Virtual

void

 

RefreshErrorInfo()

Called when GraphNode changes its error information, may be called when no change has actually occurred:

Public function

void

 

RequestRename()

Flags node as rename pending if supported

Public function Virtual

void

 

RequestRenameOnSpawn()

Requests a rename when the node was initially spawned

Protected function Virtual

void

 

SetDefaultTitleAreaWidget

(
    TSharedRef< SOverlay > DefaultTitle...
)

Public function

void

 

SetDisallowedPinConnectionEvent

Set event when the user generates a warning tooltip because a connection was invalid

Public function

void

 

SetDoubleClickEvent

(
    FSingleNodeEvent InDoubleClickEvent
)

Set event when node is double clicked

Public function

void

 

SetIsEditable

(
    TAttribute< bool > InIsEditable
)

Set attribute for determining if widget is editable

Public function Virtual

void

 

SetOwner

(
    const TSharedRef< SGraphPanel >& O...
)

Public function

void

 

SetTextCommittedEvent

(
    FOnNodeTextCommitted InDelegate
)

Set event when text is committed on the node

Protected function

void

 

SetupErrorReporting()

Set-up the error reporting widget for the node

Public function

void

 

SetVerifyTextCommitEvent

(
    FOnNodeVerifyTextCommit InOnVerifyT...
)

Set event when text is committed on the node

Protected function Const

bool

 

ShouldPinBeHidden

(
    const UEdGraphPin* InPin
)

Returns TRUE if the input pin should be hidden from view

Protected function Virtual

void

 

UpdateErrorInfo()

Called to set error text on the node

Public function Virtual

void

 

UpdateGraphNode()

Update this GraphNode to match the data that it is observing

Protected function Virtual Const

bool

 

UseLowDetailNodeTitles()

Should we use low-detail node titles?

Public function Virtual Const

bool

 

UseLowDetailPinNames()

Should we use low-detail pin names?

Overridden from SNode

Name Description

Public function Virtual Const

FString

 

GetNodeComment()

Public function Virtual Const

UObject *...

 

GetObjectBeingDisplayed()

Public function Virtual Const

FVector2D

 

GetPosition()

Public function Virtual

void

 

MoveTo

(
    const FVector2D& NewPosition,
    FNodeSet& NodeFilter,
    bool bMarkDirty
)

Overridden from SWidget

Name Description

Public function Virtual

TSharedPtr< ...

 

GetToolTip()

Public function Virtual

void

 

OnDragEnter

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget.

Public function Virtual

void

 

OnDragLeave

(
    const FDragDropEvent& DragDropEven...
)

Called during drag and drop when the drag leaves a widget.

Public function Virtual

FReply

 

OnDragOver

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

Called during drag and drop when the the mouse is being dragged over a widget.

Public function Virtual

FReply

 

OnDrop

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

Called when the user is dropping something onto a widget; terminates drag and drop.

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry& InMyGeometry,
    const FPointerEvent& InMouseEvent
)

Called when a mouse button is double clicked. Override this in derived classes.

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse button was pressed within it.

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse button was release within it.

Public function Virtual

void

 

OnToolTipClosing()

Called when a tooltip displayed from this widget is being closed

Public function Virtual

void

 

Tick

(
    const FGeometry& AllottedGeometry,
    const double InCurrentTime,
    const float InDeltaTime
)

Ticks this widget with Geometry.