class

AGraphEditor

Module
Arc
Header
#include "Arc/Widgets/AGraphEditor.h"
Namespace
Arcf

Properties

TypeNameDescription
std::function<bool(const CGraphConnection&)>ValidateConnection
std::function<std::vector<CGraphActionItem>(const CGraphActionContext&)>CollectActions
std::function<bool(const std::string& )>AcceptsAssetDropContent-browser drops. Unset means the canvas rejects every drag, so the drop falls through to whatever is behind it exactly as before.
ArcDelegate<void(const std::string& , ArcVec2 )>OnAssetDropped
std::stringBodyFontFamilyDefault "Default".
std::stringBoldFontFamilyDefault "Default".
std::stringDisplayFontFamilyDefault "Default".
std::stringMonoFontFamilyDefault "Default".
std::stringIconFontFamilyDefault "Icons".
ArcColorWireColorOverrideDefault ArcColor(0.0f, 0.0f, 0.0f, 0.0f).
boolShowMinimapDefault true.
boolShowWireArrowsDefault false.
boolAnimatePulseDefault false.
ArcDelegate<void(const std::string& )>OnNodeSelected
ArcDelegate<void(const CGraphConnection&)>OnConnectionMade
ArcDelegate<void(const CGraphConnection&)>OnConnectionRemoved
ArcDelegate<void()>OnSelectionChanged
ArcDelegate<void(const std::vector<std::string>&, const std::vector<ArcVec2>&)>OnNodesMoved
ArcDelegate<void(const CGraphSelection&)>OnDeleteRequested
ArcDelegate<void(const std::string& , ArcVec2 , ArcVec2 )>OnContextMenuRequested
ArcDelegate<void()>OnUndoRequested
ArcDelegate<void()>OnRedoRequested
ArcDelegate<void(const CGraphActionItem&, const CGraphActionContext&)>OnActionChosen
ArcDelegate<void(const std::string& , ArcVec2 )>OnCommentResized
ArcDelegate<void()>OnViewChanged
ArcDelegate<void(const CGraphConnection&, ArcVec2 )>OnConnectionDoubleClicked
ArcDelegate<void(const std::string& )>OnNodeDoubleClicked
ArcDelegate<void(const std::string& , const std::string& )>OnNodeRenamed
ArcDelegate<void(const std::string& , const std::string& , const std::string& )>OnPinValueCommitted
ArcDelegate<void(const CGraphSelection&)>OnDuplicateRequested
ArcDelegate<void(const CGraphSelection&)>OnCopyRequested
ArcDelegate<void(const CGraphSelection&)>OnCutRequested
ArcDelegate<void(ArcVec2 )>OnPasteRequested
ArcDelegate<void(const std::string& )>OnToggleBreakpoint
ArcDelegate<void()>OnFindRequestedCtrl+F and Ctrl+B. They live here rather than on each host because a graph canvas takes focus the moment it is clicked, so a host-level binding only fired while the canvas happened not to have focus — i.e. never, once you were actually working in the graph.
ArcDelegate<void(const std::string& )>OnToggleBookmark
ArcDelegate<void(const CGraphSelection&, ArcRect )>OnCommentRequestedBare C with a selection (UE's comment-from-selection): the host wraps the selection in a comment node. Bounds are in graph space, already padded around the selected nodes.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidConstruct
voidSetEmptyHintWhat an empty canvas says (an AEmptyState centred on the grid, without the point-cloud field).
boolIsShowingEmptyHintWhether the canvas is drawing its empty hint right now.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnMouseWheel
CReplyOnKeyDown
CReplyOnKeyChar
voidOnFocusLost
voidOnMouseLeave
boolOnDragEnter
boolOnDragOver
voidOnDragLeave
boolOnDrop
voidSetGraph
CGraphData&GetGraph
std::vector<std::string>GetSelectedNodeIds
int32_tGetSelectedConnectionIndex
const CGraphConnection*GetSelectedConnection
CGraphSelectionGetSelectionThe same payload the Ctrl+C / Ctrl+X / Ctrl+D shortcuts broadcast.
voidSelectNodes
boolSelectConnection
voidClearSelection
voidDeleteSelection
voidFrameAll
voidFrameSelection
voidFrameNode
voidAlignSelectionTidying.
voidSetHighlightedNodesFind-in-graph result marking.
voidClearHighlight
boolHasHighlight
voidSetBookmarkedNodes
ArcVec2GetNodeSizeA node's size in graph units as the canvas lays it out (zero when the id is unknown), so a host or test never re-derives the design's node metrics by hand.
voidBeginTitleRename
ArcVec2GetCursorGraphPosition
ArcVec2GetViewOffset
floatGetZoom
voidSetView
voidSetWatermark
boolIsActionMenuOpen
voidCloseActionMenu
voidOpenActionMenu
EArcCursorTypeOnCursorQuery
boolIsTextInput
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AGraphEditor) ARC_WIDGET_ARGS_END() static ArcColor GetPinTypeColor(EGraphPinType type)

Construct

C++
void Construct(const CArguments& args)

SetEmptyHint

C++
void SetEmptyHint(const std::string& icon, const std::string& title, const std::string& body)

What an empty canvas says (an AEmptyState centred on the grid, without the point-cloud field). An empty title turns it off.

IsShowingEmptyHint

C++
bool IsShowingEmptyHint() const

Whether the canvas is drawing its empty hint right now.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnKeyChar

C++
CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event) override

OnFocusLost

C++
void OnFocusLost(const CFocusEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

OnDragEnter

C++
bool OnDragEnter(const CGeometry& geo, const CDragDropEvent& event) override

OnDragOver

C++
bool OnDragOver(const CGeometry& geo, const CDragDropEvent& event) override

OnDragLeave

C++
void OnDragLeave(const CDragDropEvent& event) override

OnDrop

C++
bool OnDrop(const CGeometry& geo, const CDragDropEvent& event) override

SetGraph

C++
void SetGraph(const CGraphData& graph)

GetGraph

C++
CGraphData& GetGraph()

GetSelectedNodeIds

C++
std::vector<std::string> GetSelectedNodeIds() const

GetSelectedConnectionIndex

C++
int32_t GetSelectedConnectionIndex() const

GetSelectedConnection

C++
const CGraphConnection* GetSelectedConnection() const

GetSelection

C++
CGraphSelection GetSelection() const

The same payload the Ctrl+C / Ctrl+X / Ctrl+D shortcuts broadcast. A context menu that rebuilt its own selection payload could not stay in step with the shortcut, and the two that did had already diverged over whether a selected wire counts.

SelectNodes

C++
void SelectNodes(const std::vector<std::string>& ids)

SelectConnection

C++
bool SelectConnection(const CGraphConnection& connection)

ClearSelection

C++
void ClearSelection()

DeleteSelection

C++
void DeleteSelection()

FrameAll

C++
void FrameAll()

FrameSelection

C++
void FrameSelection()

FrameNode

C++
void FrameNode(const std::string& nodeId)

AlignSelection

C++
void AlignSelection(EGraphAlign mode)

Tidying. Applied to the current selection and broadcast through the SAME OnNodesMoved contract a mouse drag uses, so every host records undo and dirty state for a menu align without writing a line of it. No-ops (and does not broadcast) below two selected nodes.

SetHighlightedNodes

C++
void SetHighlightedNodes(const std::vector<std::string>& ids)

Find-in-graph result marking. Purely visual; it never changes the selection, so the details rail keeps showing what the user picked.

ClearHighlight

C++
void ClearHighlight()

HasHighlight

C++
bool HasHighlight() const

SetBookmarkedNodes

C++
void SetBookmarkedNodes(const std::vector<std::string>& ids)

GetNodeSize

C++
ArcVec2 GetNodeSize(const std::string& nodeId) const

A node's size in graph units as the canvas lays it out (zero when the id is unknown), so a host or test never re-derives the design's node metrics by hand.

BeginTitleRename

C++
void BeginTitleRename(const std::string& nodeId)

GetCursorGraphPosition

C++
ArcVec2 GetCursorGraphPosition() const

GetViewOffset

C++
ArcVec2 GetViewOffset() const

GetZoom

C++
float GetZoom() const

SetView

C++
void SetView(const ArcVec2& offset, float zoom)

SetWatermark

C++
void SetWatermark(const std::string& text)

IsActionMenuOpen

C++
bool IsActionMenuOpen() const

CloseActionMenu

C++
void CloseActionMenu()

OpenActionMenu

C++
void OpenActionMenu(const ArcVec2& screenPos, const CGraphActionContext& context)

OnCursorQuery

C++
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const override

IsTextInput

C++
bool IsTextInput() const override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AGraphEditor.h via arc.json · Nov 5, 2026Version 1.0.0