Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
NodeCanvas.h File Reference

Immediate-mode node-graph view widget: pan/zoom canvas, nodes with labeled pins, bezier links, link dragging, selection, context-menu and delete events. More...

Classes

struct  DekiEditor::NodeCanvasNode
 One node to draw. More...
 One link to draw, by node ids + pin indices. More...
struct  DekiEditor::NodeCanvasPalette
 Canvas colors (packed via EditorUI::Rgba: a<<24|b<<16|g<<8|r). More...
struct  DekiEditor::NodeCanvasEvents
 What happened this frame. More...
class  DekiEditor::NodeCanvas

Namespaces

namespace  DekiEditor

Detailed Description

Immediate-mode node-graph view widget: pan/zoom canvas, nodes with labeled pins, bezier links, link dragging, selection, context-menu and delete events.

The canvas is a pure VIEW: the caller owns the graph data and passes it in every frame; the canvas owns only view state (pan/zoom, in-progress drags) and reports interactions through NodeCanvasEvents. It draws exclusively via EditorUI (it lives in deki-editor.dll and crosses the DLL boundary), and it deliberately knows nothing about node types, documents, or undo — the hosting window (app-side) translates events into commands.

Coordinates: node x/y are graph units (css px at zoom 1). The canvas applies zoom and the global DPI scale to geometry, and sizes text via DrawTextCss so labels match widget text sizing at any DPI.