SGraphPanel

Unreal Engine C++ API Reference > Editor > GraphEditor

Inheritance Hierarchy

References

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

Syntax

class SGraphPanel :  
    public [SNodePanel](API\Editor\GraphEditor\SNodePanel),  
    public [FGCObject](API\Runtime\CoreUObject\UObject\FGCObject)  

Variables

Type Name Description
bool bIsDrawStateCached  
FCurveSequence BounceCurve Bouncing curve
bool bPreservePinPreviewConnection Should we ignore the OnStopMakingConnection unless forced?
bool bShowPIENotification Whether to draw the overlay indicating we're in PIE
FVector2D CachedAllottedGeometryScaledSize Geometry cache
TSet< FEdGraphP... CurrentHoveredPins List of pins currently being hovered over
TSharedPtr< TAr... DiffResults If this graph is displaying the results of a diff, this will provide info on how to display the nodes
TAttribute< int... FocusedDiffResult  
TObjectPtr< UEd... GraphObj  
FPointerEvent LastPointerEvent  
FGeometry LastPointerGeometry The mouse state from the last mouse move event, used to synthesize pin actions when hovering over a spline on the panel
TWeakPtr< SGrap... MarkedPin Pin marked via shift-clicking
SGraphEditor::F... OnClicked Called when the graph itself is clicked
SGraphEditor::F... OnDisallowedPinConnection Called when the user generates a warning tooltip because a connection was invalid
SGraphEditor::F... OnDoubleClicked Called when the graph itself is double clicked
SGraphEditor::F... OnDropActor Invoked when an actor is dropped onto the panel
SGraphEditor::F... OnDropStreamingLevel Invoked when a streaming level is dropped onto the panel
FOnGetContextMe... OnGetContextMenuFor Invoked when we need to summon a context menu
FSingleNodeEven... OnNodeDoubleClicked What to do when a node is double-clicked
FOnNodeTextComm... OnTextCommitted Invoked when text is committed on panel
FOnUpdateGraphP... OnUpdateGraphPanel Invoked when the panel is updated
FOnNodeVerifyTe... OnVerifyTextCommit Invoked when text is being committed on panel to verify it
SGraphEditor::E... PinVisibility Pin visibility mode
FVector2D PreviewConnectorEndpoint  
TArray< FGraphP... PreviewConnectorFromPins Sometimes the panel draws a preview connector; e.g. when the user is connecting pins
FVector2D PreviousFrameSavedMousePosForSplineOverlap The overlap results from the previous OnPaint call
FGraphSplineOve... PreviousFrameSplineOverlap  
FVector2D SavedMousePosForOnPaintEventLocalSpace Last mouse position seen, used for paint-centric highlighting
TAttribute< boo... ShowGraphStateOverlay Whether to draw decorations for graph state (PIE / ReadOnly etc.)
double TimeWhenMouseEnteredPin Time since the last mouse enter/exit on a pin
double TimeWhenMouseLeftPin  

Destructors

Type Name Description
  ~SGraphPanel () Destructor.

Functions

Type Name Description
void AddNode ( UEdGraphNode* Node, AddNodeBehavior Behavior ) Helper method to add a new node to the panel
void AddPinToHoverSet ( UEdGraphPin* HoveredPin )  
void ArrangeChildrenForContextMenuSummon ( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildre... )  
void AttachGraphEvents ( TSharedPtr< SGraphNode > CreatedSub... ) Helper to attach graph events to sub node, which won't be placed directly on the graph
void Construct ( const FArguments& InArgs ) Construct a widget
void DismissContextMenu ()  
void GetAllPins ( TSet< TSharedRef< SWidget > >& All... )  
bool GetBoundsForNode ( const UObject* InNode, FVector2D& MinCorner, FVector2D& MaxCorner, float Padding ) Attempt to retrieve the bounds for the specified node
const TShare... GetChild ( int32 ChildIndex )  
UEdGraph ... GetGraphObj ()  
TSharedPtr< ... GetNodeWidgetFromGuid ( FGuid Guid ) Get a graph node widget from the specified GUID, if it applies to any nodes in this graph
SGraphEditor... GetPinVisibility ()  
const FGraph... GetPreviousFrameSplineOverlap ()  
TArray< UEdG... GetSelectedGraphNodes () Get a list of selected editor graph nodes from the selection manager.
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.
bool IsGraphEditable () Returns if this graph is editable
bool IsNodeTitleVisible ( const UEdGraphNode* Node, bool bRequestRename ) Use to determine if a comment title is currently visible
bool IsRectVisible ( const FVector2D& TopLeft, const FVector2D& BottomRight ) Use to determine if a rectangle is currently visible
bool IsRelinkingConnection () True in case a connection is currently being relinked, false if not.
void JumpToNode ( const UEdGraphNode* JumpToMe, bool bRequestRename, bool bSelectNode )  
void JumpToPin ( const UEdGraphPin* JumptToMe )  
bool JumpToRect ( const FVector2D& BottomLeft, const FVector2D& TopRight ) Focuses the view on rectangle, zooming if neccesary
void NotifyGraphChanged ( const FEdGraphEditAction& InAction )  
void OnBeginMakingConnection ( FGraphPinHandle PinHandle )  
void OnBeginMakingConnection ( UEdGraphPin* InOriginatingPin )  
void OnBeginRelinkConnection ( const FGraphPinHandle& InSourcePin..., const FGraphPinHandle& InTargetPin... ) Indicate that the connection from the given start to the given end pins is being relinked.
void OnEndRelinkConnection ( bool bForceStop ) The relink connection operation either got cancelled or has successfully been executed.
void OnStopMakingConnection ( bool bForceStop )  
void PreservePinPreviewUntilForced ()  
void PurgeVisualRepresentation () Purges the existing visual representation (typically followed by an Update call in the next tick)
void RefreshNode ( UEdGraphNode& Node ) Refresh the visual state of a single node
void RemoveNode ( const UEdGraphNode* Node ) Helper method to remove a node from the panel
void RemovePinFromHoverSet ( UEdGraphPin* UnhoveredPin )  
void SetNodeFactory ( const TSharedRef< class FGraphNodeF... ) Sets the current widget factory.
void SetPinVisibility ( SGraphEditor::EPinVisibility InVisi... )  
void StraightenConnections () Straighten all connections between the selected nodes
void StraightenConnections ( UEdGraphPin* SourcePin, UEdGraphPin* PinToAlign ) Straighten any connections attached to the specified pin, optionally limiting to the specified pin to align
TSharedPtr< ... SummonContextMenu ( const FVector2D& WhereToSummon, const FVector2D& WhereToAddNode, UEdGraphNode* ForNode, UEdGraphPin* ForPin, const TArray< UEdGraphPin* >&... )  
void SummonCreateNodeMenuFromUICommand ( uint32 NumNodesAdded )  
void Update () Update this GraphPanel to match the data that it is observing.

Overridden from SNodePanel

Type Name Description
void AddGraphNode ( const TSharedRef< SNode >& NodeToA... ) Add a slot to the CanvasPanel dynamically
bool OnHandleLeftMouseRelease ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent )  
TSharedPtr< ... OnSummonContextMenu ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) INTERFACE TO IMPLEMENT.
void RemoveAllNodes () Remove all nodes from the panel

Overridden from SWidget

Type Name Description
TSharedPtr< ... GetToolTip ()  
void OnArrangeChildren ( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildre... ) Panels arrange their children in a space described by the AllottedGeometry parameter.
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 OnKeyDown ( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent ) Called after a key is pressed when this widget has focus (this event bubbles if not handled)
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 ) MOUSE INPUT 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.
FReply OnMouseMove ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) The system calls this method to notify the widget that a mouse moved within it.
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.
bool SupportsKeyboardFocus () Checks to see if this widget supports keyboard focus. Override this in derived classes.

Overridden from FGCObject

Type Name Description
void AddReferencedObjects ( FReferenceCollector& Collector ) Pure virtual that must be overloaded by the inheriting class.
FString GetReferencerName () Overload this method to report a name for your referencer

Classes

Type Name Description
Public struct FArguments  

Enums

Type Name Description
Protected enum AddNodeBehavior Flag to control AddNode, more readable than a bool:

Typedefs

Name Description
FOnGetContextMenuFor  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library