SGraphEditor

Interface and wrapper for GraphEditor widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class SGraphEditor : public SCompoundWidget

Remarks

Interface and wrapper for GraphEditor widgets. Gracefully handles the GraphEditorModule being unloaded.

Variables

Name Description

Protected variable

UEdGraph *

 

EdGraphObj

The Graph we are currently editing

Functions

Name Description

Public function Virtual

void

 

AddNotification

(
    FNotificationInfo& Info,
    bool bSuccess
)

Show notification on graph

Public function Virtual

void

 

CaptureKeyboard()

Capture keyboard

Public function Virtual

void

 

ClearSelectionSet()

Clear the selection

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Loads the GraphEditorModule and constructs a GraphEditor as a child of this widget.

Public function Virtual Const

bool

 

GetBoundsForNode

(
    const UEdGraphNode* InNode,
    FSlateRect& Rect,
    float Padding
)

Get Bounds for the specified node, returns false on failure

Public function Virtual

bool

 

GetBoundsForSelectedNodes

(
    FSlateRect& Rect,
    float Padding
)

Get Bounds for selected nodes, false if nothing selected

Public function Const

UEdGraph ...

 

GetCurrentGraph()

Public function Virtual

UEdGraphNode...

 

GetGraphNodeForMenu()

Public function Virtual

UEdGraphPin ...

 

GetGraphPinForMenu()

Public function Virtual Const

int32

 

GetNumberOfSelectedNodes()

Public function Virtual Const

FVector2D

 

GetPasteLocation()

Public function Virtual Const

const TSet< ...

 

GetSelectedNodes()

Public function Virtual Const

UEdGraphNode...

 

GetSingleSelectedNode()

Returns the currently selected node if there is a single node selected (if there are multiple nodes selected or none selected, it will return nullptr)

Public function Virtual Const

TSharedPtr< ...

 

GetTitleBar()

Get the title bar if there is one

Public function Virtual

void

 

GetViewBookmark

(
    FGuid& OutBookmarkId
)

Gets the current graph view bookmark

Public function Virtual

void

 

GetViewLocation

(
    FVector2D& OutLocation,
    float& OutZoomAmount
)

Gets the view location of the graph

Public function Virtual

bool

 

IsNodeTitleVisible

(
    const UEdGraphNode* Node,
    bool bRequestRename
)

Check if node title is visible with optional flag to ensure it is

Public function Virtual

void

 

JumpToNode

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

Bring the specified node into view

Public function Virtual

void

 

JumpToPin

(
    const UEdGraphPin* JumpToMe
)

Bring the specified pin into view

Public function Virtual

void

 

LockToGraphEditor

(
    TWeakPtr< SGraphEditor > Other
)

Lock two graph editors together

Public function Virtual

void

 

NotifyGraphChanged()

Invoked when the Graph being edited changes in some way.

Public function

void

 

NotifyPostPropertyChange

(
    const FPropertyChangedEvent& Prope...,
    const FString& PropertyName
)

Public function

void

 

NotifyPrePropertyChange

(
    const FString& PropertyName
)

Public function Virtual

void

 

OnAlignBottom()

Public function Virtual

void

 

OnAlignCenter()

Public function Virtual

void

 

OnAlignLeft()

Public function Virtual

void

 

OnAlignMiddle()

Public function Virtual

void

 

OnAlignRight()

Public function Virtual

void

 

OnAlignTop()

Public function Virtual

void

 

OnDistributeNodesH()

Public function Virtual

void

 

OnDistributeNodesV()

Protected function Virtual

void

 

OnGraphChanged

(
    const FEdGraphEditAction& InAction
)

Invoked when the underlying Graph is being changed.

Public function

void

 

OnModuleReloaded()

Invoked to let this widget know that the GraphEditor module has been reloaded.

Public function

void

 

OnModuleUnloading()

Invoked to let this widget know that the GraphEditor module is being unloaded.

Public function Virtual

void

 

OnStraightenConnections()

Public function Virtual

void

 

RefreshNode

(
    UEdGraphNode& Node
)

Public function Virtual

TSharedRef< ...

 

RegisterActiveTimer

(
    float TickPeriod,
    FWidgetActiveTimerDelegate TickFunc...
)

Register an active timer on the graph editor.

Public function Virtual

void

 

SelectAllNodes()

Select all nodes

Public function Virtual

void

 

SetNodeFactory

(
    const TSharedRef< class FGraphNodeF...
)

Sets the current node, pin and connection factory.

Public function Virtual

void

 

SetNodeSelection

(
    UEdGraphNode* Node,
    bool bSelect
)

Set the selection status of a node

Public function Virtual

void

 

SetPinVisibility

(
    EPinVisibility InVisibility
)

Set the pin visibility mode

Public function Virtual

void

 

SetViewLocation

(
    const FVector2D& Location,
    float ZoomAmount,
    const FGuid& BookmarkId
)

Set new viewer location and optionally set the current bookmark

Public function Virtual

void

 

StraightenConnections()

Public function Virtual

void

 

StraightenConnections

(
    UEdGraphPin* SourcePin,
    UEdGraphPin* PinToAlign
)

Public function Virtual

void

 

UnlockFromGraphEditor

(
    TWeakPtr< SGraphEditor > Other
)

Unlock two graph editors from each other

Public function Virtual

void

 

ZoomToFit

(
    bool bOnlySelection
)

Zooms out to fit either all nodes or only the selected ones.

Classes

Name

Description

Public struct

FArguments

Public struct

FGraphEditorEvents

Info about events occurring in/on the graph

Enums

Name

Description

Public enum

EPinVisibility

Pin visibility modes

Typedefs

Constants

Name

Description

AllInstances

Active GraphEditor wrappers; we will notify these about the module being unloaded so they can handle it gracefully.

References

Module

UnrealEd

Header

Editor/UnrealEd/Public/GraphEditor.h

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