SGraphNode

Unreal Engine C++ API Reference > Editor > GraphEditor

Inheritance Hierarchy

References

   
Module GraphEditor
Header /Engine/Source/Editor/GraphEditor/Public/SGraphNode.h
Include #include "SGraphNode.h"

Syntax

class SGraphNode : public [SNodePanel::SNode](API\Editor\GraphEditor\SNodePanel\SNode)  

Variables

Type Name Description
bool bProvidedComplexTooltip Is the current tooltip a complex one that should be dropped when the tooltip is no longer displayed?
bool bRenameIsPending Is a rename operation pending.
FVector2D CachedUnscaledPosition Caches true position of node
FSlateColor ErrorColor Used to set the error color
FString ErrorMsg Used to report errors on the node
TSharedPtr< cla... ErrorReporting Error handling widget
FCurveHandle FadeCurve  
UEdGraphNode &#... GraphNode The GraphNode being observed by this widget
FLinearColor IconColor Cached icon color for the node
TSharedPtr< SIn... InlineEditableText Used to display the name of the node and allow renaming of the node
TArray< TShared... InputPins Input pin widgets on this node
TAttribute< boo... IsEditable Is this node editable
TSharedPtr< SVe... LeftNodeBox The area where input pins reside
SGraphEditor::F... OnDisallowedPinConnection Called when the user generates a warning tooltip because a connection was invalid
FSingleNodeEven... OnDoubleClick  
FOnNodeTextComm... OnTextCommitted Called whenever the text on the node is committed interactively by the user
FOnNodeVerifyTe... OnVerifyTextCommit Called whenever the text on the node is being committed interactively by the user, validates the string for commit
TArray< TShared... OutputPins Output pin widgets on this node
TWeakPtr< SGrap... OwnerGraphPanelPtr The GraphPanel within in which this node resides.
TSharedPtr< SVe... RightNodeBox The area where output pins reside
const UGraphEdi... Settings Cached pointer to graph editor settings
FCurveSequence SpawnAnim  
FSlateColor VisualWarningColor Used to set the soft error color
FString VisualWarningMsg Used to report visual warnings on the node (does not break build)
TSharedPtr< cla... VisualWarningReporting Visual Warning handling widget
FCurveHandle ZoomCurve  

Constructors

Type Name Description
  SGraphNode ()  

Functions

Type Name Description
void AddPin ( const TSharedRef< SGraphPin >& Pin... ) Add a new pin to this graph node. The pin must be newly created.
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
EVisibility AdvancedViewArrowVisibility () Returns visibility of AdvancedViewButton
void ApplyRename () Sets node into rename state if supported
bool CanAllowInteractionUsingDragDropOp ( const UEdGraphNode* GraphNodeP..., const TSharedPtr< FActorDragDropOp ... ) Check whether drag and drop functionality is permitted on the given node
void CreateAdvancedViewArrow ( TSharedPtr< SVerticalBox > MainBox ) Create button to show/hide advanced pinsCreate widget to show/hide advanced pins
void CreateBelowPinControls ( TSharedPtr< SVerticalBox > MainBox ) Override this to add widgets below the pins but above advanced view arrow.
void CreateBelowWidgetControls ( TSharedPtr< SVerticalBox > MainBox ) Override this to add widgets below the node and pins.
void CreateInputSideAddButton ( TSharedPtr< SVerticalBox > InputBox ) Override this to create a button to add pins on the input side of the node
TSharedRef< ... CreateNodeContentArea () Create the inner node content area, including the left/right pin boxes
void CreateOutputSideAddButton ( TSharedPtr< SVerticalBox > OutputBo... ) Override this to create a button to add pins on the output side of the node
TSharedPtr< ... CreatePinWidget ( UEdGraphPin* Pin ) Hook that allows derived classes to supply their own SGraphPin derivatives for any pin.
void CreatePinWidgets () Create the widgets for pins on the node
void CreateStandardPinWidget ( UEdGraphPin* Pin ) Create a single pin widget
TSharedRef< ... CreateTitleRightWidget () Optionally create a widget to dock to the right in the title bar of the node.
TSharedRef< ... CreateTitleWidget ( TSharedPtr< SNodeTitle > NodeTitle )  
TSharedPtr< ... FindWidgetForPin ( UEdGraphPin* ThePin )  
const FSlate... GetAdvancedViewArrow () Up when shown, down when hidden
FLinearColor GetColorAndOpacity ()  
FSlateColor GetCommentColor () Return the desired comment bubble color
TSharedPtr< ... GetComplexTooltip () Override this to provide support for an 'expensive' tooltip widget that is only built on demand
FVector2D GetContentScale ()  
EGraphRender... GetCurrentLOD () Returns the current Node LOD or Highest LOD if unable to query
FString GetEditableNodeTitle ()  
FText GetEditableNodeTitleAsText ()  
TSharedPtr< ... GetEnabledStateWidget () Returns the widget to use for the enabled state of the node
FSlateColor GetErrorColor () Helper function to set the error color for the node
FString GetErrorMessage () Helper function to get any error text for the node
FText GetErrorMsgToolTip () Function to get error description string
TSharedPtr< ... GetHoveredPin ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) Find the pin that is hovered.
const FSlate... GetNodeBodyBrush ()  
FSlateColor GetNodeBodyColor ()  
FSlateColor GetNodeCommentColor ()  
UEdGraphNode... GetNodeObj ()  
FSlateColor GetNodeTitleColor ()  
FSlateColor GetNodeTitleIconColor ()  
FLinearColor GetNodeTitleTextColor ()  
FText GetNodeTooltip ()  
TSharedRef< ... GetNodeUnderMouse ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent )  
TSharedPtr< ... GetOwnerPanel ()  
FLinearColor GetPinLabelColorAndOpacity ()  
void GetPins ( TArray< TSharedRef< SWidget > >& A... ) Get all the pins found on this node.
void GetPins ( TSet< TSharedRef< SWidget > >& All... ) Get all the pins found on this node.
FSlateRect GetTitleRect () Return rect of the title area
FVector2D GetUnscaledPosition () Gets the unscaled position of the node from the last tick
FSlateColor GetVisualWarningColor () Helper function to set the error color for the node
FText GetVisualWarningMsgToolTip () Function to get a visual warning description string(visual warnings does not break the build)
void InvalidateGraphData () Called when ed graph data is cleared, indicating this widget can no longer safely access GraphNode - forwards call to owned pins:
EVisibility IsAddPinButtonVisible () Checks whether Add pin button should currently be visible
ECheckBoxSta... IsAdvancedViewChecked () Hidden == unchecked, shown == checked
bool IsHidingPinWidgets () Returns true if the node is hiding its pins
bool IsNameReadOnly () Helper function to check if node can be renamed
bool IsNodeEditable () Returns if widget is editable, additionally considers if the owning graph is read only
bool IsRenamePending () Returns true if a rename is pending on this node
bool IsSelectedExclusively () Checks if the node is the only node selected
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
void NotifyDisallowedPinConnection ( const UEdGraphPin* PinA, const UEdGraphPin* PinB ) Called from drag drop code when a disallowed connection is hovered
FReply OnAddPin () Callback function executed when Add pin button is clicked
void OnAdvancedViewChanged ( const ECheckBoxState NewCheckedStat... ) Show/hide advanced view
void OnCommentBubbleToggled ( bool bInCommentBubbleVisible ) Called when the node's comment bubble is toggled
void OnCommentTextCommitted ( const FText& NewComment, ETextCommit::Type CommitInfo ) Called to replace this nodes comment text
void OnNameTextCommited ( const FText& InText, ETextCommit::Type CommitInfo ) Called when text is committed on the node
bool OnVerifyNameTextChanged ( const FText& InText, FText& OutErrorMessage ) Called when text is being committed to check for validity
void PlaySpawnEffect ()  
void PopulateMetaTag ( FGraphNodeMetaData* TagMeta ) Populate a meta data tag with information about this graph node
void PositionThisNodeBetweenOtherNodes ( const TMap< UObject*, TSharedR..., TSet< UEdGraphNode* >& Previo..., TSet< UEdGraphNode* >& NextNo..., float HeightAboveWire )  
void PositionThisNodeBetweenOtherNodes ( const FVector2D& PrevPos, const FVector2D& NextPos, float HeightAboveWire )  
void PositionThisNodeBetweenOtherNodes ( const TMap< UObject*, TSharedR..., UEdGraphNode* PreviousNode, UEdGraphNode* NextNode, float HeightAboveWire )  
void RefreshErrorInfo () Called when GraphNode changes its error information, may be called when no change has actually occurred:
void RequestRename () Flags node as rename pending if supported
void RequestRenameOnSpawn () Requests a rename when the node was initially spawned
void SetDefaultTitleAreaWidget ( TSharedRef< SOverlay > DefaultTitle... )  
void SetDisallowedPinConnectionEvent ( SGraphEditor::FOnDisallowedPinConne... ) Set event when the user generates a warning tooltip because a connection was invalid
void SetDoubleClickEvent ( FSingleNodeEvent InDoubleClickEvent ) Set event when node is double clicked
void SetIsEditable ( TAttribute< bool > InIsEditable ) Set attribute for determining if widget is editable
void SetOwner ( const TSharedRef< SGraphPanel >& O... )  
void SetTextCommittedEvent ( FOnNodeTextCommitted InDelegate ) Set event when text is committed on the node
void SetupErrorReporting () Set-up the error reporting widget for the node
void SetVerifyTextCommitEvent ( FOnNodeVerifyTextCommit InOnVerifyT... ) Set event when text is committed on the node
bool ShouldPinBeHidden ( const UEdGraphPin* InPin ) Returns TRUE if the input pin should be hidden from view
void UpdateErrorInfo () Called to set error text on the node
void UpdateGraphNode () Update this GraphNode to match the data that it is observing
bool UseLowDetailNodeTitles () Should we use low-detail node titles?
bool UseLowDetailPinNames () Should we use low-detail pin names?
EVisibility VisualWarningVisibility () Controls wether to show or not the visual warning message

Overridden from SNode

Type Name Description
FString GetNodeComment ()  
UObject *... GetObjectBeingDisplayed ()  
FVector2D GetPosition ()  
void MoveTo ( const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty )  

Overridden from SWidget

Type Name Description
TSharedPtr< ... GetToolTip ()  
void OnDragEnter ( const FGeometry& MyGeometry, const FDragDropEvent& DragDropEven... ) DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget.
void OnDragLeave ( const FDragDropEvent& DragDropEven... ) Called during drag and drop when the drag leaves a widget.
FReply OnDragOver ( const FGeometry& MyGeometry, const FDragDropEvent& DragDropEven... ) Called during drag and drop when the the mouse is being dragged over a widget.
FReply OnDrop ( const FGeometry& MyGeometry, const FDragDropEvent& DragDropEven... ) Called when the user is dropping something onto a widget; terminates drag and drop.
FReply OnMouseButtonDoubleClick ( const FGeometry& InMyGeometry, const FPointerEvent& InMouseEvent ) Called when a mouse button is double clicked. Override this in derived classes.
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.
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.
void OnToolTipClosing () Called when a tooltip displayed from this widget is being closed
void Tick ( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) Ticks this widget with Geometry.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library