4. Live commands
The imgui_node_editor_live module registers project-agnostic
[live_command] functions. Each takes a JSON object with editor — the editor handle
(intptr(ctx), surfaced in the node_editor snapshot payload) — plus the
fields below, and drives the matching boost v2 entry point. So an external driver
(dastest, the MCP live API, a tool) can manipulate any editor with no app-side
plumbing. Commands are auto-discoverable at runtime via the live /commands
endpoint; require imgui/imgui_node_editor_live to register them. This module
has no daslang-callable API of its own — it is the JSON drive surface for the
boost layer.
Command |
Input fields (besides |
Effect |
|---|---|---|
|
|
Set a node’s position (editor coords). |
|
|
Select / deselect a node. |
|
|
Select / deselect a link. |
|
— |
Clear all selection. |
|
|
Queue a new link for the editor to create next frame. |
|
— |
Drop all queued (not-yet-created) links. |
|
|
Inject a “new node by drag” release; fires the app’s create-node flow. |
|
|
Queue a node deletion (cascades pins / touching links via the app). |
|
|
Queue a link deletion. |
|
— |
Drop all queued deletions. |
|
|
One-shot data-flow pulse along a link. |
|
|
Center a node in the viewport. |
|
|
Pan / zoom to frame the current selection. |
|
|
Restore a node’s saved position / size from editor settings. |
|
|
Set a node’s draw order (higher draws on top). |
|
|
Resize a group node. |
|
— |
List node ids in draw order; returns |
|
|
Inject a clipboard / edit shortcut, replayed through the app’s accept handler. |
|
— |
Drop all queued shortcuts. |
|
|
Enable / disable clipboard / edit key chords. |