SGraphPin

Represents a pin on a node in the GraphEditor

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GraphEditor

Header

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

Include

#include "SGraphPin.h"

Syntax

class SGraphPin : public SBorder

Remarks

Represents a pin on a node in the GraphEditor

Variables

Name Description

Protected variable

bool

 

bGraphDataInvalid

Flag indicating that graph data has been deleted by the user

Protected variable

bool

 

bIsMovingLinks

True when we're moving links between pins.

Protected variable

bool

 

bOnlyShowDefaultValue

If we should draw the label on this pin

Protected variable

bool

 

bShowLabel

If we should draw the label on this pin

Protected variable

bool

 

bUsePinColorForText

TRUE if the pin should use the Pin's color for the text

Protected variable

const FSlateBru ...

 

CachedImg_ArrayPin_Connected

Protected variable

const FSlateBru ...

 

CachedImg_ArrayPin_Disconnected

Protected variable

const FSlateBru ...

 

CachedImg_DelegatePin_Connected

Protected variable

const FSlateBru ...

 

CachedImg_DelegatePin_Disconnected

Protected variable

const FSlateBru ...

 

CachedImg_MapPinKey

Protected variable

const FSlateBru ...

 

CachedImg_MapPinValue

Protected variable

const FSlateBru ...

 

CachedImg_Pin_Background

Protected variable

const FSlateBru ...

 

CachedImg_Pin_BackgroundHovered

Protected variable

const FSlateBru ...

 

CachedImg_Pin_Connected

Protected variable

const FSlateBru ...

 

CachedImg_Pin_Disconnected

Protected variable

const FSlateBru ...

 

CachedImg_PosePin_Connected

Protected variable

const FSlateBru ...

 

CachedImg_PosePin_Disconnected

Protected variable

const FSlateBru ...

 

CachedImg_RefPin_Connected

Protected variable

const FSlateBru ...

 

CachedImg_RefPin_Disconnected

Protected variable

const FSlateBru ...

 

CachedImg_SetPin

Protected variable

FVector2D

 

CachedNodeOffset

Cached offset from owning node to approximate position of culled pins

Protected variable

const FSlateBru ...

 

Custom_Brush_Connected

Protected variable

const FSlateBru ...

 

Custom_Brush_Disconnected

Protected variable

TWeakPtr < SHori ...

 

FullPinHorizontalRowWidget

Horizontal box that holds the full detail pin widget, useful for outsiders to inject widgets into the pin

Protected variable

UEdGraphPin ...

 

GraphPinObj

The GraphPin that this widget represents.

Protected variable

TSet < FEdGraphP ...

 

HoverPinSet

Set of pins that are currently being hovered

Protected variable

TAttribute < boo ...

 

IsEditable

Is this pin editable

Protected variable

TSharedPtr < SWr ...

 

LabelAndValue

Label and value

Protected variable

TWeakPtr < SGrap ...

 

OwnerNodePtr

The GraphNode that owns this pin

Protected variable

FLinearColor

 

PinColorModifier

Color modifier for use by the connection drawing policy

Protected variable

TSharedPtr < SWi ...

 

PinImage

Image of pin

Protected variable

TSharedPtr < SWi ...

 

ValueWidget

Value widget for the pin, created with GetDefaultValueWidget()

Constructors

Name Description

Public function

SGraphPin()

Functions

Name Description

Protected function Virtual

FReply

 

ClickedOnPinStatusIcon()

Toggle the watch pinning

Public function

void

 

Construct

(
    const FArguments & InArgs,
    UEdGraphPin * InPin
)

Construct this widget

Protected function Virtual Const

bool

 

DoesWidgetHandleSettingEditingEnabled()

If true the graph pin subclass is responsible for setting the IsEnabled delegates for the aspects it cares about.

Public function Const

bool

 

GetDefaultValueIsEditable()

True if the pin's default value can be edited, false if it is read only

Public function Virtual Const

EVisibility

 

GetDefaultValueVisibility()

Public function Virtual

TSharedRef < ...

 

GetDefaultValueWidget()

Build the widget we should put into the 'default value' space, shown when nothing connected

Public function Const

EEdGraphPinD ...

 

GetDirection()

Public function

TWeakPtr < SH ...

 

GetFullPinHorizontalRowWidget()

Retrieves the full horizontal box that contains the pin's row content

Public function Const

bool

 

GetIsConnectable()

Returns whether or not this pin is currently connectable

Public function Const

TSharedRef < ...

 

GetLabelAndValue()

Get the label/value part of the pin widget

Protected function Virtual

TSharedRef < ...

 

GetLabelWidget

(
    const FName & InPinLabelStyle
)

Get the widget we should put in the label space, which displays the name of the pin.

Public function Const

FVector2D

 

GetNodeOffset()

Gets Node Offset

Protected function Const

const FSlate ...

 

GetPinBorder()

Protected function Virtual Const

FSlateColor

 

GetPinColor()

Protected function Const

TOptional < E ...

 

GetPinCursor()

Protected function Virtual Const

const FSlate ...

 

GetPinIcon()

Protected function Const

FText

 

GetPinLabel()

Protected function Const

EVisibility

 

GetPinLabelVisibility()

If we should show the label on this pin

Public function Const

UEdGraphPin ...

 

GetPinObj()

Protected function Virtual Const

const FSlate ...

 

GetPinStatusIcon()

Protected function Virtual Const

EVisibility

 

GetPinStatusIconVisibility()

Protected function Virtual Const

FSlateColor

 

GetPinTextColor()

Protected function Const

EVisibility

 

GetPinVisiblity()

Determines the pin's visibility based on the LOD factor, when it is low LOD, no hit test will occur

Protected function Const

FSlateColor

 

GetSecondaryPinColor()

Protected function Const

const FSlate ...

 

GetSecondaryPinIcon()

Protected function Const

FText

 

GetTooltipText()

Public function Const

TSharedRef < ...

 

GetValueWidget()

Get the widget created by GetDefaultValueWidget()

Public function

void

 

InvalidateGraphData()

Called when ed graph data is cleared, indicating this widget can no longer safely access GraphPinObj Typically an SGraphPin is destroyed before the ed graph data is actually deleted but because SWidget is reference counted we have had problems in the past with the SGraphPin (or Node) living unexpectedly long.

Public function Const

bool

 

IsArray()

Public function Const

bool

 

IsByMutableRef()

Public function Const

bool

 

IsConnected()

Public function Const

bool

 

IsDelegate()

Public function Const

bool

 

IsEditingEnabled()

True if pin can be edited

Public function Const

bool

 

IsMap()

Public function Const

EVisibility

 

IsPinVisibleAsAdvanced()

If pin in node is visible at all

Public function Const

bool

 

IsSet()

Public function Virtual

FReply

 

OnPinMouseDown

(
    const FGeometry & SenderGeometry,
    const FPointerEvent & MouseEvent
)

Handle clicking on the pin

Public function

FReply

 

OnPinNameMouseDown

(
    const FGeometry & SenderGeometry,
    const FPointerEvent & MouseEvent
)

Handle clicking on the pin name

Public function

void

 

SetCustomPinIcon

(
    const FSlateBrush * InConnected...,
    const FSlateBrush * InDisconnec...
)

Override the visual look of the pin by providing two custom brushes

Public function

void

 

SetIsEditable

(
    TAttribute < bool > InIsEditable
)

Set attribute for determining if pin is editable

Public function

void

 

SetOnlyShowDefaultValue

(
    bool bNewOnlyShowDefaultValue
)

Set this pin to only be used to display default value

Public function

void

 

SetOwner

(
    const TSharedRef < SGraphNode > Owne...
)

Public function

void

 

SetPinColorModifier

(
    FLinearColor InColor
)

Allows the connection drawing policy to control the pin color

Public function

void

 

SetShowLabel

(
    bool bNewDrawLabel
)

Control whether we draw the label on this pin

Protected function Virtual

TSharedRef < ...

 

SpawnPinDragEvent

(
    const TSharedRef < class SGraphPanel ...,
    const TArray < TSharedRef < SGraphPin ...
)

Spawns a FDragConnection or similar class for the pin drag event

Public function Virtual

bool

 

TryHandlePinConnection

(
    SGraphPin & OtherSPin
)

Tries to handle making a connection to another pin, depending on the schema and the pins it may do:

Protected function Virtual Const

bool

 

UseLowDetailPinNames()

Should we use low-detail pin names?

Overridden from SWidget

Name Description

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

 

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

 

OnMouseEnter

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has entered it.

Public function Virtual

void

 

OnMouseLeave

(
    const FPointerEvent & MouseEvent
)

The system will use this event to notify a widget that the cursor has left it.

Public function Virtual

FReply

 

OnMouseMove

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

The system calls this method to notify the widget that a mouse moved within it.

Public function Virtual

void

 

Tick

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

Ticks this widget with Geometry.

Classes

Name

Description

Public struct

FArguments

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback