API Reference
This page documents the wrapper functions we have for the imgui-node-editor API.
ImGuiNodeEditor.@with_font_scale — Macro
@with_font_scale scale bodyRun body with a font pushed so text drawn inside the node canvas renders at scale× the base font size as measured on screen, regardless of zoom. The canvas magnifies the draw list by current_scale, so the local font is sized to scale / current_scale() and the glyphs are baked at their on-screen size (rasterizer density = the magnification, snapped to a power of two) — this keeps them crisp rather than minifying a too-large atlas (which aliases). Font and rasterizer density are restored afterwards; body's value is forwarded.
For example, a node title that stays readable (capped at 1× on screen) when zooming out but grows freely when zooming in:
@with_font_scale max(1f0, current_scale()) draw_title()ImGuiNodeEditor.AcceptCopy — Method
AcceptCopy() -> Bool
ImGuiNodeEditor.AcceptCreateNode — Method
AcceptCreateNode() -> Bool
ImGuiNodeEditor.AcceptCut — Method
AcceptCut() -> Bool
ImGuiNodeEditor.AcceptDeletedItem — Function
AcceptDeletedItem() -> Bool
AcceptDeletedItem(deleteDependencies) -> Bool
ImGuiNodeEditor.AcceptDuplicate — Method
AcceptDuplicate() -> Bool
ImGuiNodeEditor.AcceptNewItem — Function
AcceptNewItem(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
) -> Bool
AcceptNewItem(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness::Real
) -> Bool
ImGuiNodeEditor.AcceptNewItem — Method
AcceptNewItem() -> Bool
ImGuiNodeEditor.AcceptPaste — Method
AcceptPaste() -> Bool
ImGuiNodeEditor.AreShortcutsEnabled — Method
AreShortcutsEnabled() -> Bool
ImGuiNodeEditor.Begin — Function
Begin(id)
Begin(
id,
size::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.BeginCreate — Function
BeginCreate() -> Bool
BeginCreate(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
) -> Bool
BeginCreate(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness
) -> Bool
ImGuiNodeEditor.BeginDelete — Method
BeginDelete() -> Bool
ImGuiNodeEditor.BeginGroupHint — Method
BeginGroupHint(nodeId::ImGuiNodeEditor.lib.NodeId) -> Bool
ImGuiNodeEditor.BeginNode — Method
BeginNode(id::ImGuiNodeEditor.lib.NodeId)
ImGuiNodeEditor.BeginPin — Method
BeginPin(id::ImGuiNodeEditor.lib.PinId, kind)
ImGuiNodeEditor.BeginShortcut — Method
BeginShortcut() -> Bool
ImGuiNodeEditor.BreakLinks — Method
BreakLinks(nodeId::ImGuiNodeEditor.lib.NodeId) -> Int32
ImGuiNodeEditor.BreakLinks — Method
BreakLinks(pinId::ImGuiNodeEditor.lib.PinId) -> Int32
ImGuiNodeEditor.CanvasToScreen — Method
CanvasToScreen(
pos::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
) -> CImGui.lib.ImVec2
ImGuiNodeEditor.CenterNodeOnScreen — Method
CenterNodeOnScreen(nodeId::ImGuiNodeEditor.lib.NodeId)
ImGuiNodeEditor.ClearSelection — Method
ClearSelection()
ImGuiNodeEditor.CreateEditor — Function
CreateEditor() -> Ptr{ImGuiNodeEditor.lib.EditorContext}
CreateEditor(
config
) -> Ptr{ImGuiNodeEditor.lib.EditorContext}
ImGuiNodeEditor.DeleteLink — Method
DeleteLink(linkId) -> Bool
ImGuiNodeEditor.DeleteNode — Method
DeleteNode(nodeId::ImGuiNodeEditor.lib.NodeId) -> Bool
ImGuiNodeEditor.DeselectLink — Method
DeselectLink(linkId)
ImGuiNodeEditor.DeselectNode — Method
DeselectNode(nodeId::ImGuiNodeEditor.lib.NodeId)
ImGuiNodeEditor.Destroy — Method
Destructor for Config
ImGuiNodeEditor.DestroyEditor — Method
DestroyEditor(ctx)
ImGuiNodeEditor.EnableShortcuts — Method
EnableShortcuts(enable)
ImGuiNodeEditor.End — Method
End()
ImGuiNodeEditor.EndCreate — Method
EndCreate()
ImGuiNodeEditor.EndDelete — Method
EndDelete()
ImGuiNodeEditor.EndGroupHint — Method
EndGroupHint()
ImGuiNodeEditor.EndNode — Method
EndNode()
ImGuiNodeEditor.EndPin — Method
EndPin()
ImGuiNodeEditor.EndShortcut — Method
EndShortcut()
ImGuiNodeEditor.Flow — Function
Flow(linkId)
Flow(linkId, direction)
ImGuiNodeEditor.GetActionContextLinks! — Method
GetActionContextLinks!(
ids::Vector{ImGuiNodeEditor.lib.LinkId}
) -> Vector{ImGuiNodeEditor.lib.LinkId}
ids is resized to fit and returned.
ImGuiNodeEditor.GetActionContextLinks — Method
GetActionContextLinks(
) -> Vector{ImGuiNodeEditor.lib.LinkId}
Allocating variant of GetActionContextLinks!.
ImGuiNodeEditor.GetActionContextNodes! — Method
GetActionContextNodes!(
ids::Vector{ImGuiNodeEditor.lib.NodeId}
) -> Vector{ImGuiNodeEditor.lib.NodeId}
ids is resized to fit and returned.
ImGuiNodeEditor.GetActionContextNodes — Method
GetActionContextNodes(
) -> Vector{ImGuiNodeEditor.lib.NodeId}
Allocating variant of GetActionContextNodes!.
ImGuiNodeEditor.GetActionContextSize — Method
GetActionContextSize() -> Int32
ImGuiNodeEditor.GetBackgroundClickButtonIndex — Method
GetBackgroundClickButtonIndex() -> Int32
ImGuiNodeEditor.GetBackgroundDoubleClickButtonIndex — Method
GetBackgroundDoubleClickButtonIndex() -> Int32
ImGuiNodeEditor.GetConfig — Function
GetConfig() -> Ptr{ImGuiNodeEditor.lib.Config}
GetConfig(ctx) -> Ptr{ImGuiNodeEditor.lib.Config}
ImGuiNodeEditor.GetCurrentEditor — Method
GetCurrentEditor() -> Ptr{ImGuiNodeEditor.lib.EditorContext}
ImGuiNodeEditor.GetCurrentZoom — Method
GetCurrentZoom() -> Float32
ImGuiNodeEditor.GetDoubleClickedLink — Method
GetDoubleClickedLink() -> ImGuiNodeEditor.lib.LinkId
ImGuiNodeEditor.GetDoubleClickedNode — Method
GetDoubleClickedNode() -> ImGuiNodeEditor.lib.NodeId
ImGuiNodeEditor.GetDoubleClickedPin — Method
GetDoubleClickedPin() -> ImGuiNodeEditor.lib.PinId
ImGuiNodeEditor.GetGroupMax — Method
GetGroupMax() -> CImGui.lib.ImVec2
ImGuiNodeEditor.GetGroupMin — Method
GetGroupMin() -> CImGui.lib.ImVec2
ImGuiNodeEditor.GetHintBackgroundDrawList — Method
GetHintBackgroundDrawList() -> Ptr{CImGui.lib.ImDrawList}
ImGuiNodeEditor.GetHintForegroundDrawList — Method
GetHintForegroundDrawList() -> Ptr{CImGui.lib.ImDrawList}
ImGuiNodeEditor.GetHoveredLink — Method
GetHoveredLink() -> ImGuiNodeEditor.lib.LinkId
ImGuiNodeEditor.GetHoveredNode — Method
GetHoveredNode() -> ImGuiNodeEditor.lib.NodeId
ImGuiNodeEditor.GetHoveredPin — Method
GetHoveredPin() -> ImGuiNodeEditor.lib.PinId
ImGuiNodeEditor.GetLinkPins — Method
GetLinkPins(
linkId,
startPinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
endPinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
ImGuiNodeEditor.GetNodeBackgroundDrawList — Method
GetNodeBackgroundDrawList(
nodeId::ImGuiNodeEditor.lib.NodeId
) -> Ptr{CImGui.lib.ImDrawList}
ImGuiNodeEditor.GetNodeCount — Method
GetNodeCount() -> Int32
ImGuiNodeEditor.GetNodePosition — Method
GetNodePosition(
nodeId::ImGuiNodeEditor.lib.NodeId
) -> CImGui.lib.ImVec2
ImGuiNodeEditor.GetNodeSize — Method
GetNodeSize(
nodeId::ImGuiNodeEditor.lib.NodeId
) -> CImGui.lib.ImVec2
ImGuiNodeEditor.GetNodeZPosition — Method
GetNodeZPosition(
nodeId::ImGuiNodeEditor.lib.NodeId
) -> Float32
ImGuiNodeEditor.GetOrderedNodeIds! — Method
GetOrderedNodeIds!(
ids::Vector{ImGuiNodeEditor.lib.NodeId}
) -> Vector{ImGuiNodeEditor.lib.NodeId}
ids is resized to fit and returned.
ImGuiNodeEditor.GetOrderedNodeIds — Method
GetOrderedNodeIds() -> Vector{ImGuiNodeEditor.lib.NodeId}
Allocating variant of GetOrderedNodeIds!.
ImGuiNodeEditor.GetScreenSize — Method
GetScreenSize() -> CImGui.lib.ImVec2
ImGuiNodeEditor.GetSelectedLinks! — Method
GetSelectedLinks!(
ids::Vector{ImGuiNodeEditor.lib.LinkId}
) -> Vector{ImGuiNodeEditor.lib.LinkId}
ids is resized to fit and returned.
ImGuiNodeEditor.GetSelectedLinks — Method
GetSelectedLinks() -> Vector{ImGuiNodeEditor.lib.LinkId}
Allocating variant of GetSelectedLinks!.
ImGuiNodeEditor.GetSelectedNodes! — Method
GetSelectedNodes!(
ids::Vector{ImGuiNodeEditor.lib.NodeId}
) -> Vector{ImGuiNodeEditor.lib.NodeId}
ids is resized to fit and returned.
ImGuiNodeEditor.GetSelectedNodes — Method
GetSelectedNodes() -> Vector{ImGuiNodeEditor.lib.NodeId}
Allocating variant of GetSelectedNodes!.
ImGuiNodeEditor.GetSelectedObjectCount — Method
GetSelectedObjectCount() -> Int32
ImGuiNodeEditor.GetStyle — Method
GetStyle() -> Ptr{ImGuiNodeEditor.lib.cimnodes_editor_Style}
ImGuiNodeEditor.GetStyleColorName — Method
GetStyleColorName(colorIndex) -> Ptr{Int8}
ImGuiNodeEditor.Group — Method
Group(size::Union{CImGui.lib.ImVec2, Tuple{T, T} where T})
ImGuiNodeEditor.HasAnyLinks — Method
HasAnyLinks(nodeId::ImGuiNodeEditor.lib.NodeId) -> Bool
ImGuiNodeEditor.HasAnyLinks — Method
HasAnyLinks(pinId::ImGuiNodeEditor.lib.PinId) -> Bool
ImGuiNodeEditor.HasSelectionChanged — Method
HasSelectionChanged() -> Bool
ImGuiNodeEditor.IsActive — Method
IsActive() -> Bool
ImGuiNodeEditor.IsBackgroundClicked — Method
IsBackgroundClicked() -> Bool
ImGuiNodeEditor.IsBackgroundDoubleClicked — Method
IsBackgroundDoubleClicked() -> Bool
ImGuiNodeEditor.IsLinkSelected — Method
IsLinkSelected(linkId) -> Bool
ImGuiNodeEditor.IsNodeSelected — Method
IsNodeSelected(nodeId::ImGuiNodeEditor.lib.NodeId) -> Bool
ImGuiNodeEditor.IsSuspended — Method
IsSuspended() -> Bool
ImGuiNodeEditor.Link — Function
Link(
id,
startPinId::ImGuiNodeEditor.lib.PinId,
endPinId::ImGuiNodeEditor.lib.PinId
) -> Bool
Link(
id,
startPinId::ImGuiNodeEditor.lib.PinId,
endPinId::ImGuiNodeEditor.lib.PinId,
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
) -> Bool
Link(
id,
startPinId::ImGuiNodeEditor.lib.PinId,
endPinId::ImGuiNodeEditor.lib.PinId,
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness
) -> Bool
ImGuiNodeEditor.NavigateToContent — Function
NavigateToContent()
NavigateToContent(duration)
ImGuiNodeEditor.NavigateToSelection — Function
NavigateToSelection()
NavigateToSelection(zoomIn)
NavigateToSelection(zoomIn, duration)
ImGuiNodeEditor.PinHadAnyLinks — Method
PinHadAnyLinks(pinId::ImGuiNodeEditor.lib.PinId) -> Bool
ImGuiNodeEditor.PinPivotAlignment — Method
PinPivotAlignment(
alignment::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PinPivotRect — Method
PinPivotRect(
a::Union{CImGui.lib.ImVec2, Tuple{T, T} where T},
b::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PinPivotScale — Method
PinPivotScale(
scale::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PinPivotSize — Method
PinPivotSize(
size::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PinRect — Method
PinRect(
a::Union{CImGui.lib.ImVec2, Tuple{T, T} where T},
b::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PopStyleColor — Function
PopStyleColor()
PopStyleColor(count)
ImGuiNodeEditor.PopStyleVar — Function
PopStyleVar()
PopStyleVar(count)
ImGuiNodeEditor.PushStyleColor — Method
PushStyleColor(
colorIndex,
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
)
ImGuiNodeEditor.PushStyleVar — Method
PushStyleVar(
varIndex::ImGuiNodeEditor.lib.StyleVar,
value::Real
)
ImGuiNodeEditor.PushStyleVar — Method
PushStyleVar(
varIndex::ImGuiNodeEditor.lib.StyleVar,
value::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.PushStyleVar — Method
PushStyleVar(
varIndex::ImGuiNodeEditor.lib.StyleVar,
value::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
)
ImGuiNodeEditor.QueryDeletedLink — Function
QueryDeletedLink(
linkId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.LinkId}}
) -> Bool
QueryDeletedLink(
linkId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.LinkId}},
startId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
QueryDeletedLink(
linkId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.LinkId}},
startId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
endId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
ImGuiNodeEditor.QueryDeletedNode — Method
QueryDeletedNode(
nodeId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.NodeId}}
) -> Bool
ImGuiNodeEditor.QueryNewLink — Function
QueryNewLink(
startId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
endId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
) -> Bool
QueryNewLink(
startId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
endId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness::Real
) -> Bool
ImGuiNodeEditor.QueryNewLink — Method
QueryNewLink(
startId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
endId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
ImGuiNodeEditor.QueryNewNode — Function
QueryNewNode(
pinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
) -> Bool
QueryNewNode(
pinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}},
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness::Real
) -> Bool
ImGuiNodeEditor.QueryNewNode — Method
QueryNewNode(
pinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
ImGuiNodeEditor.RejectDeletedItem — Method
RejectDeletedItem()
ImGuiNodeEditor.RejectNewItem — Function
RejectNewItem(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T}
)
RejectNewItem(
color::Union{CImGui.lib.ImVec4, NTuple{4, T} where T},
thickness::Real
)
ImGuiNodeEditor.RejectNewItem — Method
RejectNewItem()
ImGuiNodeEditor.RestoreNodeState — Method
RestoreNodeState(nodeId::ImGuiNodeEditor.lib.NodeId)
ImGuiNodeEditor.Resume — Method
Resume()
ImGuiNodeEditor.ScreenToCanvas — Method
ScreenToCanvas(
pos::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
) -> CImGui.lib.ImVec2
ImGuiNodeEditor.SelectLink — Function
SelectLink(linkId)
SelectLink(linkId, append)
ImGuiNodeEditor.SelectNode — Function
SelectNode(nodeId::ImGuiNodeEditor.lib.NodeId)
SelectNode(nodeId::ImGuiNodeEditor.lib.NodeId, append)
ImGuiNodeEditor.SetCurrentEditor — Method
SetCurrentEditor(ctx)
ImGuiNodeEditor.SetGroupSize — Method
SetGroupSize(
nodeId::ImGuiNodeEditor.lib.NodeId,
size::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.SetNodePosition — Method
SetNodePosition(
nodeId::ImGuiNodeEditor.lib.NodeId,
editorPosition::Union{CImGui.lib.ImVec2, Tuple{T, T} where T}
)
ImGuiNodeEditor.SetNodeZPosition — Method
SetNodeZPosition(nodeId::ImGuiNodeEditor.lib.NodeId, z)
ImGuiNodeEditor.ShowBackgroundContextMenu — Method
ShowBackgroundContextMenu() -> Bool
ImGuiNodeEditor.ShowLinkContextMenu — Method
ShowLinkContextMenu(
linkId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.LinkId}}
) -> Bool
ImGuiNodeEditor.ShowNodeContextMenu — Method
ShowNodeContextMenu(
nodeId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.NodeId}}
) -> Bool
ImGuiNodeEditor.ShowPinContextMenu — Method
ShowPinContextMenu(
pinId::Union{Ptr{Nothing}, Ref{ImGuiNodeEditor.lib.PinId}}
) -> Bool
ImGuiNodeEditor.Suspend — Method
Suspend()
ImGuiNodeEditor.Value — Method
Value(self::ImGuiNodeEditor.lib.LinkId) -> UInt64
ImGuiNodeEditor.Value — Method
Value(self::ImGuiNodeEditor.lib.NodeId) -> UInt64
ImGuiNodeEditor.Value — Method
Value(self::ImGuiNodeEditor.lib.PinId) -> UInt64
ImGuiNodeEditor.current_scale — Method
current_scale() -> Float32Factor by which the canvas magnifies drawn content on screen: > 1 when zoomed in, < 1 when zoomed out. This is the reciprocal of GetCurrentZoom, which returns the canvas InvScale (and so reads backwards). Returns 1 when no editor is active, or when the zoom is non-positive (which a corrupt settings file or a bad CustomZoomLevels can produce).
ImGuiNodeEditor.lib.Config — Method
Config() -> Ptr{ImGuiNodeEditor.lib.Config}
The returned Config is heap-allocated, it must be freed with Destroy.
ImGuiNodeEditor.lib.LinkId — Method
LinkId(val::Integer) -> ImGuiNodeEditor.lib.LinkId
ImGuiNodeEditor.lib.NodeId — Method
NodeId(val::Integer) -> ImGuiNodeEditor.lib.NodeId
ImGuiNodeEditor.lib.PinId — Method
PinId(val::Integer) -> ImGuiNodeEditor.lib.PinId