SNodePanel

Unreal Engine C++ API Reference > Editor > GraphEditor

Inheritance Hierarchy

References

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

Syntax

class SNodePanel : public [SPanel](API\Runtime\SlateCore\Widgets\SPanel)  

Variables

Type Name Description
bool bAllowContinousZoomInterpolation Allow continous zoom interpolation?
bool bDeferredZoomToNodeExtents Deferred zoom to node extents
bool bDeferredZoomToSelection Deferred zoom to selected node extents
bool bIsPanning Are we panning the view at the moment?
bool bIsZoomingWithTrackpad Are we zooming the view with trackpad at the moment?
bool bRequestDeferredPan True if pending request for deferred panning
bool bShowSoftwareCursor Whether the software cursor should be drawn
bool bTeleportInsteadOfScrollingWhenZoomingToFit Teleport immediately, or smoothly scroll when doing a deferred zoom
bool bVisualUpdatePending A flag to detect when a visual update is pending to prevent deferred commands like zoom to fit from running when there are no widgets
FGeometry CachedGeometry Cached geometry for use within the active timer
TSlotlessChildr... Children The graph node widgets owned by this panel
EGraphRendering... CurrentLOD Current LOD level for nodes/pins
const UObject &... DeferredMovementTargetObject If non-null and a part of this panel, this node will be brought into view on the next Tick
FVector2D DeferredPanPosition Position to pan to
TSet< const UOb... DeferredSelectionTargetObjects If not empty and a part of this panel, this node will be selected and brought into view on the next Tick
TAttribute< boo... IsEditable Is the graph editable (can nodes be moved, etc...)?
FInputChord LastKeyChordDetected The last key chord detected in this graph panel
FMarqueeOperati... Marquee A pending marquee operation if it's active
FVector2D NodeGrabOffset Where in the title the user grabbed to initiate the drag
TMap< UObject &... NodeToWidgetLookup Given a node, find the corresponding widget
TWeakPtr< SNode... NodeUnderMousePtr The node that the user is dragging. Null when they are not dragging a node.
FVector2D OldViewOffset The position within the graph at which the user was looking last tick
float OldZoomAmount The actual scalar zoom amount last tick
SGraphEditor::F... OnNodeSingleClicked Called when the user left clicks on a node without dragging
SGraphEditor::F... OnSpawnNodeByShortcut Invoked when the user may be attempting to spawn a node using a shortcut
TMap< TWeakPtr<... OriginalNodePositions Node positions pre-drag, used to limit transaction creation on drag
FVector2D PastePosition The position where we should paste when a user executes the paste command.
int32 PreviousZoomLevel Previous Zoom Level
TSharedPtr< FSc... ScopedTransactionPtr The current transaction for undo/redo
FGraphSelection... SelectionManager Nodes selected in this instance of the editor; the selection is per-instance of the GraphEditor
FVector2D SoftwareCursorPosition The current position of the software cursor
float TotalGestureMagnify Cumulative magnify delta from trackpad gesture
float TotalMouseDelta The total distance that the mouse has been dragged while down
float TotalMouseDeltaXY The additive X and Y components of mouse drag (used when zooming)
FVector2D ViewOffset The position within the graph at which the user is looking
TSlotlessChildr... VisibleChildren  
int32 ZoomLevel How zoomed in/out we are. e.g. 0.25f results in quarter-sized nodes.
FCurveSequence ZoomLevelFade Curve that handles fading the 'Zoom +X' text
FCurveSequence ZoomLevelGraphFade Fade on zoom for graph
TUniquePtr< FZo... ZoomLevels The interface for mapping ZoomLevel values to actual node scaling values.
float ZoomPadding Zoom selection padding
FVector2D ZoomStartOffset Offset in the panel the user started the LMB+RMB zoom from

Constructors

Type Name Description
  SNodePanel ()  

Functions

Type Name Description
void AddGraphNode ( const TSharedRef< SNode >& NodeToA... ) Add a slot to the CanvasPanel dynamically
void ApplyMarqueeSelection ( const FMarqueeOperation& InMarquee, const FGraphPanelSelectionSet& Cur..., TSet< TObjectPtr< UObject >>& OutN... ) Apply the marquee operation to the current selection
void ArrangeChildNodes ( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildre... ) Arrange child nodes - allows derived classes to supply non-node children in OnArrangeChildren
void CancelZoomToFit () Cancels any active zoom-to-fit action.
void CenterObject ( const UObject* ObjectToCenter ) On the next tick, centers the widget associated with the object if it exists
void ChangeZoomLevel ( int32 ZoomLevelDelta, const FVector2D& WidgetSpaceZoomOr..., bool bOverrideZoomLimiting ) Change zoom level by the specified zoom level delta, about the specified origin.
FVector2D ComputeEdgePanAmount ( const FGeometry& MyGeometry, const FVector2D& MouseEvent ) Compute much panel needs to change to pan to location
void Construct () Initialize members
bool Contains ( UObject* Node ) Is the given node being observed by a widget in this panel?
void FinalizeNodeMovements () Commit transactions for any node movements
void FindNodesAffectedByMarquee ( FGraphPanelSelectionSet& OutAffect... ) Figure out which nodes intersect the marquee rectangle
bool GetBoundsForNode ( const UObject* InNode, FVector2D& MinCorner, FVector2D& MaxCorner, float Padding ) Get the bounds of the given node
bool GetBoundsForNodes ( bool bSelectionSetOnly, FVector2D& MinCorner, FVector2D& MaxCorner, float Padding ) Get the bounds of the selected nodes
bool GetBoundsForSelectedNodes ( FSlateRect& Rect, float Padding ) Get the bounding area for the currently selected nodes
EGraphRender... GetCurrentLOD () Returns the current LOD level of this panel, based on the zoom factor
FVector2D GetPastePosition ()  
uint32 GetSnapGridSize () Get the grid snap size
const FGuid ... GetViewBookmarkId ()  
FVector2D GetViewOffset ()  
float GetZoomAmount () The zoom amount; e.g. a value of 0.25f results in quarter-sized nodes
bool GetZoomTargetRect ( FVector2D& TopLeft, FVector2D& BottomRight ) When a panel is scrolling/zooming to a target, this can be called to get it's destination
FText GetZoomText ()  
FSlateColor GetZoomTextColorAndOpacity ()  
FVector2D GraphCoordToPanelCoord ( const FVector2D& GraphSpaceCoordin... ) Given a coordinate in graph space (e.g. a node's position), return the same coordinate in widget space while taking zoom and panning into account
bool HasDeferredObjectFocus () If it is focusing on a particular object
bool HasDeferredZoomDestination () Query whether this graph is about to start panning/zooming towards a destination
bool HasMoved () Returns if the panel has been panned or zoomed since the last update
bool IsNodeCulled ( const TSharedRef< SNode >& Node, const FGeometry& AllottedGeometry ) Determines if a specified node is not visually relevant.
void OnBeginNodeInteraction ( const TSharedRef< SNode >& InNodeT..., const FVector2D& GrabOffset ) Lets the CanvasPanel know that the user is interacting with a node.
void OnEndNodeInteraction ( const TSharedRef< SNode >& InNodeT... ) Lets the CanvasPanel know that the user has ended interacting with a node.
bool OnHandleLeftMouseRelease ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent )  
TSharedPtr< ... OnSummonContextMenu ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) INTERFACE TO IMPLEMENT.
void PaintBackgroundAsLines ( const FSlateBrush* BackgroundI..., const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawEl..., int32& DrawLayerId ) Paint the background as lines.
void PaintComment ( const FString& CommentText, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawEl..., int32 DrawLayerId, const FLinearColor& CommentTinting, float& HeightAboveNode, const FWidgetStyle& InWidgetStyle ) Paint a comment bubble.
void PaintMarquee ( const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawEl..., int32 DrawLayerId ) Paint the marquee selection rectangle.
void PaintSoftwareCursor ( const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawEl..., int32 DrawLayerId ) Paint the software mouse if necessary.
void PaintSurroundSunkenShadow ( const FSlateBrush* ShadowImage, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawEl..., int32 DrawLayerId ) Paint the well shadow (around the perimeter)
FVector2D PanelCoordToGraphCoord ( const FVector2D& PanelSpaceCoordin... ) Given a coordinate in panel space (i.e. panel widget space), return the same coordinate in graph space while taking zoom and panning into account
FSlateRect PanelRectToGraphRect ( const FSlateRect& PanelSpaceRect ) Given a rectangle in panel space, return a rectangle in graph space.
void PopulateVisibleChildren ( const FGeometry& AllottedGeometry ) Populate visibile children array
void PostChangedZoom () Should be called whenever the zoom level has changed.
void RemoveAllNodes () Remove all nodes from the panel
void RequestDeferredPan ( const FVector2D& TargetPosition ) Ask panel to scroll to location
void RequestZoomToFit () Fires up a per-tick function to zoom the graph to fit.
void RestoreViewSettings ( const FVector2D& InViewOffset, float InZoomAmount, const FGuid& InBookmarkGuid ) Restore the graph panel to the supplied view offset/zoom.
bool ScrollToLocation ( const FGeometry& MyGeometry, FVector2D DesiredCenterPosition, const float InDeltaTime ) Scroll the view to the desired location
void SelectAndCenterObject ( const UObject* ObjectToSelect, bool bCenter ) On the next tick, centers and selects the widget associated with the object if it exists
void SetZoomLevelsContainer () Sets the zoom levels container.
void UpdateViewOffset ( const FGeometry& MyGeometry, const FVector2D& TargetPosition ) Update the new view offset location
void ZoomToFit ( bool bOnlySelection ) Zooms out to fit either all nodes or only the selected ones.
bool ZoomToLocation ( const FVector2D& CurrentSizeWithou..., const FVector2D& DesiredSize, bool bDoneScrolling ) Zoom to fit the desired size
void ZoomToTarget ( const FVector2D& TopLeft, const FVector2D& BottomRight ) Zooms to the specified target rect

Overridden from SWidget

Type Name Description
FVector2D ComputeDesiredSize ( float ) A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user.
FChildren &#... GetAllChildren () Returns all the panel children rather than only visible
FChildren &#... GetChildren () All widgets must provide a way to access their children in a layout-agnostic way.
float GetRelativeLayoutScale ( int32 ChildIndex, float LayoutScaleMultiplier ) What is the Child's scale relative to this widget.
void OnArrangeChildren ( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildre... ) Panels arrange their children in a space described by the AllottedGeometry parameter.
FCursorReply OnCursorQuery ( const FGeometry& MyGeometry, const FPointerEvent& CursorEvent ) The system asks each widget under the mouse to provide a cursor. This event is bubbled.
void OnFocusLost ( const FFocusEvent& InFocusEvent ) Called when this widget loses focus. This event does not bubble.
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 OnKeyUp ( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent ) Called after a key is released when this widget has focus
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.
void OnMouseCaptureLost ( const FCaptureLostEvent& CaptureLo... ) Called when this widget had captured the mouse, but that capture has been revoked for some reason.
FReply OnMouseMove ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) The system calls this method to notify the widget that a mouse moved within it.
FReply OnMouseWheel ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) Called when the mouse wheel is spun. This event is bubbled.
FReply OnTouchEnded ( const FGeometry& MyGeometry, const FPointerEvent& InTouchEvent ) Called when a touchpad touch is ended (finger lifted)
FReply OnTouchGesture ( const FGeometry& MyGeometry, const FPointerEvent& GestureEvent ) TOUCH and GESTURES Called when the user performs a gesture on trackpad. This event is bubbled.
void Tick ( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) Ticks this widget with Geometry.

Classes

Type Name Description
Public class SNode  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library