AGraphEditor
- Module
- Arc
- Header
#include "Arc/Widgets/AGraphEditor.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
std::function<bool(const CGraphConnection&)> | ValidateConnection | |
std::function<std::vector<CGraphActionItem>(const CGraphActionContext&)> | CollectActions | |
std::function<bool(const std::string& )> | AcceptsAssetDrop | Content-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::string | BodyFontFamily | Default "Default". |
std::string | BoldFontFamily | Default "Default". |
std::string | DisplayFontFamily | Default "Default". |
std::string | MonoFontFamily | Default "Default". |
std::string | IconFontFamily | Default "Icons". |
ArcColor | WireColorOverride | Default ArcColor(0.0f, 0.0f, 0.0f, 0.0f). |
bool | ShowMinimap | Default true. |
bool | ShowWireArrows | Default false. |
bool | AnimatePulse | Default 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()> | OnFindRequested | Ctrl+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 )> | OnCommentRequested | Bare 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
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | Construct | |
void | SetEmptyHint | What an empty canvas says (an AEmptyState centred on the grid, without the point-cloud field). |
bool | IsShowingEmptyHint | Whether the canvas is drawing its empty hint right now. |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
CReply | OnMouseWheel | |
CReply | OnKeyDown | |
CReply | OnKeyChar | |
void | OnFocusLost | |
void | OnMouseLeave | |
bool | OnDragEnter | |
bool | OnDragOver | |
void | OnDragLeave | |
bool | OnDrop | |
void | SetGraph | |
CGraphData& | GetGraph | |
std::vector<std::string> | GetSelectedNodeIds | |
int32_t | GetSelectedConnectionIndex | |
const CGraphConnection* | GetSelectedConnection | |
CGraphSelection | GetSelection | The same payload the Ctrl+C / Ctrl+X / Ctrl+D shortcuts broadcast. |
void | SelectNodes | |
bool | SelectConnection | |
void | ClearSelection | |
void | DeleteSelection | |
void | FrameAll | |
void | FrameSelection | |
void | FrameNode | |
void | AlignSelection | Tidying. |
void | SetHighlightedNodes | Find-in-graph result marking. |
void | ClearHighlight | |
bool | HasHighlight | |
void | SetBookmarkedNodes | |
ArcVec2 | GetNodeSize | 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. |
void | BeginTitleRename | |
ArcVec2 | GetCursorGraphPosition | |
ArcVec2 | GetViewOffset | |
float | GetZoom | |
void | SetView | |
void | SetWatermark | |
bool | IsActionMenuOpen | |
void | CloseActionMenu | |
void | OpenActionMenu | |
EArcCursorType | OnCursorQuery | |
bool | IsTextInput | |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(AGraphEditor) ARC_WIDGET_ARGS_END() static ArcColor GetPinTypeColor(EGraphPinType type)Construct
void Construct(const CArguments& args)SetEmptyHint
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
bool IsShowingEmptyHint() constWhether the canvas is drawing its empty hint right now.
ComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseWheel
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyDown
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnKeyChar
CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event) overrideOnFocusLost
void OnFocusLost(const CFocusEvent& event) overrideOnMouseLeave
void OnMouseLeave(const CPointerEvent& event) overrideOnDragEnter
bool OnDragEnter(const CGeometry& geo, const CDragDropEvent& event) overrideOnDragOver
bool OnDragOver(const CGeometry& geo, const CDragDropEvent& event) overrideOnDragLeave
void OnDragLeave(const CDragDropEvent& event) overrideOnDrop
bool OnDrop(const CGeometry& geo, const CDragDropEvent& event) overrideSetGraph
void SetGraph(const CGraphData& graph)GetGraph
CGraphData& GetGraph()GetSelectedNodeIds
std::vector<std::string> GetSelectedNodeIds() constGetSelectedConnectionIndex
int32_t GetSelectedConnectionIndex() constGetSelectedConnection
const CGraphConnection* GetSelectedConnection() constGetSelection
CGraphSelection GetSelection() constThe 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
void SelectNodes(const std::vector<std::string>& ids)SelectConnection
bool SelectConnection(const CGraphConnection& connection)ClearSelection
void ClearSelection()DeleteSelection
void DeleteSelection()FrameAll
void FrameAll()FrameSelection
void FrameSelection()FrameNode
void FrameNode(const std::string& nodeId)AlignSelection
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
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
void ClearHighlight()HasHighlight
bool HasHighlight() constSetBookmarkedNodes
void SetBookmarkedNodes(const std::vector<std::string>& ids)GetNodeSize
ArcVec2 GetNodeSize(const std::string& nodeId) constA 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
void BeginTitleRename(const std::string& nodeId)GetCursorGraphPosition
ArcVec2 GetCursorGraphPosition() constGetViewOffset
ArcVec2 GetViewOffset() constGetZoom
float GetZoom() constSetView
void SetView(const ArcVec2& offset, float zoom)SetWatermark
void SetWatermark(const std::string& text)IsActionMenuOpen
bool IsActionMenuOpen() constCloseActionMenu
void CloseActionMenu()OpenActionMenu
void OpenActionMenu(const ArcVec2& screenPos, const CGraphActionContext& context)OnCursorQuery
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const overrideIsTextInput
bool IsTextInput() const overrideGetTypeName
const char* GetTypeName() const override