imgui-node-editor is a C++ extension for Dear ImGui that adds a fully interactive node graph editor, enabling visual programming and blueprint-style graph editing within immediate-mode GUI applications. At its core, it provides a customizable node graph UI component where users can place, drag, and connect nodes with pins, supporting Bézier curve connections, automatic highlights, and a default theme modeled after blueprint editors. The editor handles graph navigation with smooth zooming, scrolling, selection rectangles, group dragging, and keyboard shortcuts for cut, copy, paste, and delete operations.
The project distinguishes itself through its immediate-mode architecture, rendering the entire node graph each frame using Dear ImGui's API with no retained scene graph or incremental update logic. It features Bézier curve connection routing with automatic path calculation based on pin positions and canvas zoom, pin-based connection validation that checks type compatibility and prevents circular or duplicate links at runtime, and selection-rectangle hit testing using axis-aligned bounding box intersection tests. The editor also includes a context-menu action dispatch system that maps user-selected actions to immediate-mode button callbacks without an event queue, and a serialization-through-callback system that persists node layout and state by invoking user-provided callbacks, leaving the serialization format and storage entirely to the host application.
The editor supports fully custom content rendering inside nodes and pins, allowing developers to define the visual appearance of each element, along with a customizable theme system that includes Bézier curve links and automatic highlights. Graph layout persistence saves and restores node positions, connections, and state across sessions using a custom serialization system. The project provides a complete visual programming editor with canvas coordinate transforms for smooth zooming and panning through a single matrix multiplication per frame.