Navigation
API > API/Editor > API/Editor/GraphEditor
| Name | SGraphNode |
| Type | class |
| Header File | /Engine/Source/Editor/GraphEditor/Public/SGraphNode.h |
| Include Path | #include "SGraphNode.h" |
Syntax
class SGraphNode : public SNodePanel::SNode
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SNodePanel::SNode → SGraphNode
- FSlateControlledConstruction → SWidget → SPanel → SNodePanel::SNode → SGraphNode
Derived Classes
SGraphNode derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SGraphNode() |
SGraphNode.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ControlFlowSequence | TSharedPtr< SVerticalBox > | SGraphNode.h | ||
| SnapParent | TWeakPtr< SGraphNode > | SGraphNode.h | ||
| TitleLODBranchNode | TSharedPtr< SLevelOfDetailBranchNode > | SGraphNode.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyRename() |
Sets node into rename state if supported | SGraphNode.h | |
void CancelRename() |
Cancels the rename editing mode | SGraphNode.h | |
virtual void CreatePinWidgets() |
Create the widgets for pins on the node | SGraphNode.h | |
virtual void CreateStandardPinWidget
(
UEdGraphPin* Pin |
Create a single pin widget | SGraphNode.h | |
void DrawChildrenNodeShadow
(
const FGraphPanelSelectionSet& SelectionSet, |
SGraphNode.h | ||
TSharedPtr< SGraphPin > FindWidgetForPin
(
UEdGraphPin* ThePin |
SGraphNode.h | ||
void ForEachNodeIncludingChildren
(
TFunctionRef< void(const TSharedRef< SGraphNode >&)> Ftor |
SGraphNode.h | ||
void ForEachNodeSnappedToControlFlowPin
(
TFunctionRef< void(const TSharedRef< SGraphNode >&)> Ftor |
SGraphNode.h | ||
void ForEachNodeSnappedToDataPin
(
TFunctionRef< void(const TSharedRef< SGraphNode >&)> Ftor |
SGraphNode.h | ||
void ForEachPinOnSnappedChild
(
TFunctionRef< void(const TSharedRef< SGraphPin >&)> Ftor |
SGraphNode.h | ||
TArray< FArrangedWidget > GetArrangedSnappedChildNodes
(
const FGeometry& Geometry |
Snapping: | SGraphNode.h | |
FLinearColor GetColorAndOpacity() |
SGraphNode.h | ||
UE::Slate::FDeprecateVector2DResult GetContentScale() |
SGraphNode.h | ||
EGraphRenderingLOD::Type GetCurrentLOD() |
Returns the current Node LOD or Highest LOD if unable to query | SGraphNode.h | |
FString GetEditableNodeTitle() |
SGraphNode.h | ||
FText GetEditableNodeTitleAsText() |
SGraphNode.h | ||
virtual TOptional< FSlateColor > GetHighlightColor
(
const SGraphPin* InGraphPin |
Allows the node to override the pin highlight color | SGraphNode.h | |
virtual TSharedPtr< SGraphPin > GetHoveredPin
(
const FGeometry& MyGeometry, |
Find the pin that is hovered. | SGraphNode.h | |
virtual const FSlateBrush * GetNodeBodyBrush() |
SGraphNode.h | ||
virtual FSlateColor GetNodeBodyColor() |
SGraphNode.h | ||
FSlateColor GetNodeCommentColor() |
SGraphNode.h | ||
FGeometry GetNodeGeometry
(
const FGeometry& Geometry |
SGraphNode.h | ||
UEdGraphNode * GetNodeObj() |
SGraphNode.h | ||
virtual FSlateColor GetNodeTitleColor() |
SGraphNode.h | ||
virtual FSlateColor GetNodeTitleIconColor() |
SGraphNode.h | ||
virtual FLinearColor GetNodeTitleTextColor() |
SGraphNode.h | ||
virtual FText GetNodeTooltip() |
SGraphNode.h | ||
virtual TSharedRef< SGraphNode > GetNodeUnderMouse
(
const FGeometry& MyGeometry, |
SGraphNode.h | ||
TSharedPtr< SGraphPanel > GetOwnerPanel() |
SGraphNode.h | ||
virtual TOptional< const FSlateBrush * > GetPinBorder
(
const SGraphPin* InGraphPin |
Allows the node to override the pin border image | SGraphNode.h | |
FLinearColor GetPinLabelColorAndOpacity() |
SGraphNode.h | ||
void GetPins
(
TArray< TSharedRef< SWidget > >& AllPins |
SGraphNode.h | ||
void GetPins
(
TSet< TSharedRef< SWidget > >& AllPins |
Get all the pins found on this node. | SGraphNode.h | |
void GetPinsIncludingSnappedChildren
(
TSet< TSharedRef< SWidget > >& AllPins |
Returns all of the pins, including those nested within this node | SGraphNode.h | |
void GetPinsToDraw
(
TSet< TSharedRef< SWidget > >& AllPins |
Returns the set of pins that should have their connections drawn, including nested pins | SGraphNode.h | |
virtual TOptional< FSlateColor > GetPinTextColor
(
const SGraphPin* InGraphPin |
Allows the node to override the pin text color | SGraphNode.h | |
TSharedPtr< SGraphNode > GetSnappedChildForPosition
(
const FGeometry& Geometry, |
SGraphNode.h | ||
virtual FSlateRect GetTitleRect() |
Return rect of the title area | SGraphNode.h | |
virtual TSharedPtr< IToolTip > GetToolTip() |
SGraphNode.h | ||
UE::Slate::FDeprecateVector2DResult GetUnscaledPosition() |
Gets the unscaled position of the node from the last tick | SGraphNode.h | |
void InvalidateGraphData() |
Called when ed graph data is cleared, indicating this widget can no longer safely access GraphNode - forwards call to owned pins: | SGraphNode.h | |
virtual bool IsHidingPinWidgets() |
Returns true if the node is hiding its pins | SGraphNode.h | |
virtual bool IsNodeEditable() |
Returns if widget is editable, additionally considers if the owning graph is read only | SGraphNode.h | |
bool IsRenamePending() |
Returns true if a rename is pending on this node | SGraphNode.h | |
UE::Slate::FDeprecateVector2DResult NodeCoordToGraphCoord
(
const UE::Slate::FDeprecateVector2DParameter& PanelSpaceCoordinate |
Given a coordinate in SGraphNode space, return the same coordinate in graph space while taking zoom and panning of the parent graph into account | SGraphNode.h | |
void NotifyDisallowedPinConnection
(
const UEdGraphPin* PinA, |
Called from drag drop code when a disallowed connection is hovered | SGraphNode.h | |
virtual void OnCommentBubbleToggled
(
bool bInCommentBubbleVisible |
Called when the node's comment bubble is toggled | SGraphNode.h | |
virtual void OnCommentTextCommitted
(
const FText& NewComment, |
Called to replace this nodes comment text | SGraphNode.h | |
virtual void OnDragEnter
(
const FGeometry& MyGeometry, |
SGraphNode.h | ||
virtual void OnDragLeave
(
const FDragDropEvent& DragDropEvent |
SGraphNode.h | ||
virtual FReply OnDragOver
(
const FGeometry& MyGeometry, |
SGraphNode.h | ||
virtual FReply OnDrop
(
const FGeometry& MyGeometry, |
SGraphNode.h | ||
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
SGraphNode.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was pressed within it. | SGraphNode.h | |
virtual FReply OnMouseButtonUp
(
const FGeometry& MyGeometry, |
SGraphNode.h | ||
virtual void OnToolTipClosing() |
SGraphNode.h | ||
void PlaySpawnEffect() |
SGraphNode.h | ||
virtual void RefreshErrorInfo() |
Called when GraphNode changes its error information, may be called when no change has actually occurred: | SGraphNode.h | |
void RequestRename() |
Flags node as rename pending if supported | SGraphNode.h | |
virtual void RequestRenameOnSpawn() |
Requests a rename when the node was initially spawned | SGraphNode.h | |
void SetDisallowedPinConnectionEvent
(
SGraphEditor::FOnDisallowedPinConnection InOnDisallowedPinConnection |
Set event when the user generates a warning tooltip because a connection was invalid | SGraphNode.h | |
void SetDoubleClickEvent
(
FSingleNodeEvent InDoubleClickEvent |
Set event when node is double clicked | SGraphNode.h | |
void SetIsEditable
(
TAttribute< bool > InIsEditable |
Set attribute for determining if widget is editable | SGraphNode.h | |
virtual void SetOwner
(
const TSharedRef< SGraphPanel >& OwnerPanel |
SGraphNode.h | ||
void SetTextCommittedEvent
(
FOnNodeTextCommitted InDelegate |
Set event when text is committed on the node | SGraphNode.h | |
void SetVerifyTextCommitEvent
(
FOnNodeVerifyTextCommit InOnVerifyTextCommit |
Set event when text is committed on the node | SGraphNode.h | |
virtual void Tick
(
const FGeometry& AllottedGeometry, |
SGraphNode.h | ||
virtual void UpdateGraphNode() |
Update this GraphNode to match the data that it is observing | SGraphNode.h | |
virtual bool UseLowDetailPinNames() |
Should we use low-detail pin names? | SGraphNode.h |
Overridden from SNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2f GetDesiredSizeForMarquee2f() |
SGraphNode.h | ||
virtual FString GetNodeComment() |
SGraphNode.h | ||
virtual UObject * GetObjectBeingDisplayed() |
SGraphNode.h | ||
virtual FVector2f GetPosition2f() |
SGraphNode.h | ||
virtual void MoveTo
(
const FVector2f& NewPosition, |
SGraphNode.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddPin
(
const TSharedRef< SGraphPin >& PinToAdd |
Add a new pin to this graph node. The pin must be newly created. | SGraphNode.h | |
TSharedRef< SWidget > AddPinButtonContent
(
FText PinText, |
Creates widget for an Add pin button, which can then be added to the node | SGraphNode.h | |
virtual EVisibility AdvancedViewArrowVisibility() |
Returns visibility of AdvancedViewButton | SGraphNode.h | |
virtual void CreateAdvancedViewArrow
(
TSharedPtr< SVerticalBox > MainBox |
Create button to show/hide advanced pinsCreate widget to show/hide advanced pins | SGraphNode.h | |
virtual void CreateBelowPinControls
(
TSharedPtr< SVerticalBox > MainBox |
Override this to add widgets below the pins but above advanced view arrow. | SGraphNode.h | |
virtual void CreateBelowWidgetControls
(
TSharedPtr< SVerticalBox > MainBox |
Override this to add widgets below the node and pins. | SGraphNode.h | |
virtual TSharedRef< SWidget > CreateIconWidget() |
Returns the widget to use for the corner icon of the node | SGraphNode.h | |
virtual void CreateInputSideAddButton
(
TSharedPtr< SVerticalBox > InputBox |
Override this to create a button to add pins on the input side of the node | SGraphNode.h | |
virtual TSharedRef< SWidget > CreateNodeContentArea() |
Create the inner node content area, including the left/right pin boxes | SGraphNode.h | |
virtual void CreateOutputSideAddButton
(
TSharedPtr< SVerticalBox > OutputBox |
Override this to create a button to add pins on the output side of the node | SGraphNode.h | |
virtual TSharedPtr< SGraphPin > CreatePinWidget
(
UEdGraphPin* Pin |
Hook that allows derived classes to supply their own SGraphPin derivatives for any pin. | SGraphNode.h | |
virtual TSharedRef< SWidget > CreateTitleRightWidget() |
Optionally create a widget to dock to the right in the title bar of the node. | SGraphNode.h | |
virtual TSharedRef< SWidget > CreateTitleWidget
(
TSharedPtr< SNodeTitle > NodeTitle |
SGraphNode.h | ||
virtual const FSlateBrush * GetAdvancedViewArrow() |
Up when shown, down when hidden | SGraphNode.h | |
virtual FSlateColor GetCommentColor() |
Return the desired comment bubble color | SGraphNode.h | |
virtual TSharedPtr< SToolTip > GetComplexTooltip() |
Override this to provide support for an 'expensive' tooltip widget that is only built on demand | SGraphNode.h | |
virtual TSharedPtr< SWidget > GetEnabledStateWidget() |
Returns the widget to use for the enabled state of the node | SGraphNode.h | |
FSlateColor GetErrorColor() |
Helper function to set the error color for the node | SGraphNode.h | |
FString GetErrorMessage() |
Helper function to get any error text for the node | SGraphNode.h | |
FText GetErrorMsgToolTip() |
Function to get error description string | SGraphNode.h | |
virtual TOptional< ETextOverflowPolicy > GetNameOverflowPolicy() |
Determines how the node title overflow is handled | SGraphNode.h | |
FSlateColor GetVisualWarningColor() |
Helper function to set the error color for the node | SGraphNode.h | |
FText GetVisualWarningMsgToolTip() |
Function to get a visual warning description string(visual warnings does not break the build) | SGraphNode.h | |
virtual EVisibility IsAddPinButtonVisible() |
Checks whether Add pin button should currently be visible | SGraphNode.h | |
virtual ECheckBoxState IsAdvancedViewChecked() |
Hidden == unchecked, shown == checked | SGraphNode.h | |
virtual bool IsNameReadOnly() |
Helper function to check if node can be renamed | SGraphNode.h | |
bool IsSelectedExclusively() |
Checks if the node is the only node selected | SGraphNode.h | |
virtual FReply OnAddPin() |
Callback function executed when Add pin button is clicked | SGraphNode.h | |
virtual void OnAdvancedViewChanged
(
const ECheckBoxState NewCheckedState |
Show/hide advanced view | SGraphNode.h | |
void OnNameTextCommited
(
const FText& InText, |
Called when text is committed on the node | SGraphNode.h | |
bool OnVerifyNameTextChanged
(
const FText& InText, |
Called when text is being committed to check for validity | SGraphNode.h | |
virtual void PopulateMetaTag
(
FGraphNodeMetaData* TagMeta |
Populate a meta data tag with information about this graph node | SGraphNode.h | |
void PositionThisNodeBetweenOtherNodes
(
const FVector2f& PrevPos, |
SGraphNode.h | ||
void PositionThisNodeBetweenOtherNodes
(
const TMap< UObject*, TSharedRef< SNode > >& NodeToWidgetLookup, |
SGraphNode.h | ||
void PositionThisNodeBetweenOtherNodes
(
const TMap< UObject*, TSharedRef< SNode > >& NodeToWidgetLookup, |
SGraphNode.h | ||
virtual void SetDefaultTitleAreaWidget
(
TSharedRef< SOverlay > DefaultTitleAreaWidget |
SGraphNode.h | ||
void SetupErrorReporting() |
Set-up the error reporting widget for the node | SGraphNode.h | |
bool ShouldPinBeHidden
(
const UEdGraphPin* InPin |
Returns TRUE if the input pin should be hidden from view | SGraphNode.h | |
virtual void UpdateErrorInfo() |
Called to set error text on the node | SGraphNode.h | |
virtual bool UseLowDetailNodeTitles() |
Should we use low-detail node titles? | SGraphNode.h | |
EVisibility VisualWarningVisibility() |
Controls wether to show or not the visual warning message | SGraphNode.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CanAllowInteractionUsingDragDropOp
(
const UEdGraphNode* GraphNodePtr, |
Check whether drag and drop functionality is permitted on the given node | SGraphNode.h |