brain_deer.plugins.warpdrive.tools.base

Shared contracts for WarpDrive interaction tools (no Qt).

Classes

ToolContext

Read-only snapshot the widget passes into a tool on each gesture.

ToolResult

What the widget should do after a tool handled a mouse event.

WarpTool

One exclusive mouse tool in the WarpDrive panel.

Module Contents

class brain_deer.plugins.warpdrive.tools.base.ToolContext

Read-only snapshot the widget passes into a tool on each gesture.

map_source: Callable[[WorldPoint], WorldPoint]

Map a display-frame click back to the uncorrected source frame.

class brain_deer.plugins.warpdrive.tools.base.ToolResult

What the widget should do after a tool handled a mouse event.

committed: list[brain_deer.warp.corrections.ControlPoint] = []

New points to append to the session (empty if still gesturing).

pending_source: WorldPoint | None = None

Display-frame source of an in-flight correction (for glyphs).

pending_target: WorldPoint | None = None

Display-frame target of an in-flight correction (for glyphs/preview).

class brain_deer.plugins.warpdrive.tools.base.WarpTool

Bases: Protocol

One exclusive mouse tool in the WarpDrive panel.

reset() → None

Clear any in-flight gesture state (tool toggled off / switched).