SGraphPanel

Windows
MacOS
Linux

Inheritance Hierarchy

SNodePanel

FGCObject

SGraphPanel

References

Module

GraphEditor

Header

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

Include

#include "SGraphPanel.h"

Syntax

class SGraphPanel :
    public SNodePanel,
    public FGCObject

Variables

Name Description

Protected variable

FCurveSequence

 

BounceCurve

Bouncing curve

Protected variable

bool

 

bPreservePinPreviewConnection

Should we ignore the OnStopMakingConnection unless forced?

Protected variable

bool

 

bShowPIENotification

Whether to draw the overlay indicating we're in PIE

Protected variable

FVector2D

 

CachedAllottedGeometryScaledSize

Geometry cache

Protected variable

TSet< FEdGraphP...

 

CurrentHoveredPins

List of pins currently being hovered over

Protected variable

UEdGraph *

 

GraphObj

Protected variable

UEdGraph *

 

GraphObjToDiff

Protected variable

FPointerEvent

 

LastPointerEvent

Protected variable

FGeometry

 

LastPointerGeometry

The mouse state from the last mouse move event, used to synthesize pin actions when hovering over a spline on the panel

Public variable

TWeakPtr< SGrap...

 

MarkedPin

Pin marked via shift-clicking

Protected variable

SGraphEditor::F...

 

OnDisallowedPinConnection

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

Protected variable

SGraphEditor::F...

 

OnDropActor

Invoked when an actor is dropped onto the panel

Protected variable

SGraphEditor::F...

 

OnDropStreamingLevel

Invoked when a streaming level is dropped onto the panel

Protected variable

FOnGetContextMe...

 

OnGetContextMenuFor

Invoked when we need to summon a context menu

Protected variable

FSingleNodeEven...

 

OnNodeDoubleClicked

What to do when a node is double-clicked

Protected variable

FOnNodeTextComm...

 

OnTextCommitted

Invoked when text is committed on panel

Protected variable

FOnUpdateGraphP...

 

OnUpdateGraphPanel

Invoked when the panel is updated

Protected variable

FOnNodeVerifyTe...

 

OnVerifyTextCommit

Invoked when text is being committed on panel to verify it

Protected variable

SGraphEditor::E...

 

PinVisibility

Pin visibility mode

Protected variable

FVector2D

 

PreviewConnectorEndpoint

Protected variable

TArray< FGraphP...

 

PreviewConnectorFromPins

Sometimes the panel draws a preview connector; e.g. when the user is connecting pins

Protected variable

FVector2D

 

PreviousFrameSavedMousePosForSplineOverlap

The overlap results from the previous OnPaint call

Protected variable

FGraphSplineOve...

 

PreviousFrameSplineOverlap

Protected variable

FVector2D

 

SavedMousePosForOnPaintEventLocalSpace

Last mouse position seen, used for paint-centric highlighting

Protected variable

TAttribute< boo...

 

ShowGraphStateOverlay

Whether to draw decorations for graph state (PIE / ReadOnly etc.)

Protected variable

double

 

TimeWhenMouseEnteredPin

Time since the last mouse enter/exit on a pin

Protected variable

double

 

TimeWhenMouseLeftPin

Destructors

Name Description

Public function

~SGraphPanel()

Destructor.

Functions

Name Description

Protected function

void

 

AddNode

(
    UEdGraphNode* Node,
    AddNodeBehavior Behavior
)

Helper method to add a new node to the panel

Public function

void

 

AddPinToHoverSet

(
    UEdGraphPin* HoveredPin
)

Public function Const

void

 

ArrangeChildrenForContextMenuSummon

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Public function

void

 

AttachGraphEvents

(
    TSharedPtr< SGraphNode > CreatedSub...
)

Helper to attach graph events to sub node, which won't be placed directly on the graph

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct a widget

Public function

void

 

GetAllPins

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

Public function Const

bool

 

GetBoundsForNode

(
    const UObject* InNode,
    FVector2D& MinCorner,
    FVector2D& MaxCorner,
    float Padding
)

Attempt to retrieve the bounds for the specified node

Protected function

const TShare...

 

GetChild

(
    int32 ChildIndex
)

Public function Const

UEdGraph ...

 

GetGraphObj()

Public function Const

TSharedPtr< ...

 

GetNodeWidgetFromGuid

(
    FGuid Guid
)

Get a graph node widget from the specified GUID, if it applies to any nodes in this graph

Public function Const

SGraphEditor...

 

GetPinVisibility()

Public function

EActiveTimer...

 

InvalidatePerTick

(
    double InCurrentTime,
    float InDeltaTime
)

When the graph panel needs to be dynamically refreshing for animations, this function is registered to tick and invalidate the UI.

Public function Const

bool

 

IsGraphEditable()

Returns if this graph is editable

Public function

bool

 

IsNodeTitleVisible

(
    const UEdGraphNode* Node,
    bool bRequestRename
)

Use to determine if a comment title is currently visible

Public function

bool

 

IsRectVisible

(
    const FVector2D& TopLeft,
    const FVector2D& BottomRight
)

Use to determine if a rectangle is currently visible

Public function

void

 

JumpToNode

(
    const UEdGraphNode* JumpToMe,
    bool bRequestRename,
    bool bSelectNode
)

Public function

void

 

JumpToPin

(
    const UEdGraphPin* JumptToMe
)

Public function

bool

 

JumpToRect

(
    const FVector2D& BottomLeft,
    const FVector2D& TopRight
)

Focuses the view on rectangle, zooming if neccesary

Protected function

void

 

NotifyGraphChanged

(
    const FEdGraphEditAction& InAction
)

Public function

void

 

OnBeginMakingConnection

(
    FGraphPinHandle PinHandle
)

Public function

void

 

OnBeginMakingConnection

(
    UEdGraphPin* InOriginatingPin
)

Public function

void

 

OnStopMakingConnection

(
    bool bForceStop
)

Public function

void

 

PreservePinPreviewUntilForced()

Public function

void

 

PurgeVisualRepresentation()

Purges the existing visual representation (typically followed by an Update call in the next tick)

Public function

void

 

RefreshNode

(
    UEdGraphNode& Node
)

Refresh the visual state of a single node

Protected function

void

 

RemoveNode

(
    const UEdGraphNode* Node
)

Helper method to remove a node from the panel

Public function

void

 

RemovePinFromHoverSet

(
    UEdGraphPin* UnhoveredPin
)

Public function

void

 

SetNodeFactory

(
    const TSharedRef< class FGraphNodeF...
)

Sets the current widget factory.

Public function

void

 

SetPinVisibility

(
    SGraphEditor::EPinVisibility InVisi...
)

Public function

void

 

StraightenConnections()

Straighten all connections between the selected nodes

Public function

void

 

StraightenConnections

(
    UEdGraphPin* SourcePin,
    UEdGraphPin* PinToAlign
)

Straighten any connections attached to the specified pin, optionally limiting to the specified pin to align

Public function

TSharedPtr< ...

 

SummonContextMenu

(
    const FVector2D& WhereToSummon,
    const FVector2D& WhereToAddNode,
    UEdGraphNode* ForNode,
    UEdGraphPin* ForPin,
    const TArray< UEdGraphPin* >&...
)

Public function

void

 

SummonCreateNodeMenuFromUICommand

(
    uint32 NumNodesAdded
)

Public function

void

 

Update()

Update this GraphPanel to match the data that it is observing.

Overridden from SNodePanel

Name Description

Public function Virtual

void

 

AddGraphNode

(
    const TSharedRef< SNode >& NodeToA...
)

Add a slot to the CanvasPanel dynamically

Public function Virtual

bool

 

OnHandleLeftMouseRelease

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Public function Virtual

TSharedPtr< ...

 

OnSummonContextMenu

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

INTERFACE TO IMPLEMENT.

Public function Virtual

void

 

RemoveAllNodes()

Remove all nodes from the panel

Overridden from SWidget

Name Description

Public function Virtual

TSharedPtr< ...

 

GetToolTip()

Public function Virtual Const

void

 

OnArrangeChildren

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Panels arrange their children in a space described by the AllottedGeometry parameter.

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

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

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
)

MOUSE INPUT 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

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 Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Public function Virtual Const

bool

 

SupportsKeyboardFocus()

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

Public function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Classes

Name

Description

Public struct

FArguments

Enums

Name

Description

Protected enum

AddNodeBehavior

Flag to control AddNode, more readable than a bool:

Typedefs

Name

Description

FOnGetContextMenuFor

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss