Namespace FlowGraph.Core.Input
Classes
- BehaviorBase
Base class for behaviors with default no-op implementations.
- BehaviorResult
Result of a behavior's input handling.
- GraphHitTestResult
Result of a graph-wide hit test, identifying what element (if any) was hit and providing typed access to the target.
- HitTestResult<TElement>
Result of a hit test operation against a specific element type.
- PortHitInfo
Information about a hit port.
- ResizeHandleHitInfo
Information about a hit resize handle on a node.
- ShapeResizeHandleHitInfo
Information about a hit resize handle on a shape.
Interfaces
- IBehavior
A behavior that can observe and optionally intercept graph input events.
- IGraphHitTester
Hit tester for the entire graph surface. Aggregates hit tests across all element types with proper priority ordering.
Hit Test Priority Order (first match wins):
- Resize handles (highest priority - always on top)
- Ports (small targets need priority)
- Nodes (front to back by Z-order)
- Edges (may need tolerance-based hit testing)
- Groups (behind their contents)
- Canvas (empty space, lowest priority)
Inspired by:
- react-diagrams: DiagramEngine.getModelAtPosition() with type filtering
- Konva.js: Stage.getIntersection() returning topmost shape
- draw.io/mxGraph: mxGraph.getCellAt() with priority handling
- IGraphInputEvent
Framework-agnostic representation of a graph input event. Wraps hit test results and modifier state without exposing UI framework types.
- IHitTestable<TElement>
Interface for components that support hit testing.
Contract: Implementations MUST document and enforce the coordinate space specified by HitTestCoordinateSpace. Callers MUST provide positions in the declared coordinate space.
Inspired by:
- Konva.js: Stage.getIntersection(pos) returning the topmost Shape
- react-diagrams: DiagramEngine.getModelAtPosition()
- WPF/Avalonia: VisualTreeHelper.HitTest() pattern
Enums
- HitTargetType
The type of element hit during a graph hit test.
- InputModifiers
Keyboard modifier flags (framework-agnostic).
- MouseButton
Mouse button identifiers.
- ResizeHandlePosition
Positions of resize handles on a node or shape.