onPointerEvent

abstract fun onPointerEvent(event: PointerEvent, localPosition: IntOffset): InputResult(source)

Handles a pointer event after layout hit testing.

The event position is tested against half-open accumulated bounds. A child may receive an event outside its parent's bounds when the child itself is placed there. The runtime does not add implicit parent clipping.

The event position remains in tree coordinates. A drag displacement is inverse-scaled into this node's local logical units, while scroll displacement retains its adapter-normalized wheel units.

Return

whether dispatch should stop.

Parameters

event

the tree-positioned event with receiver-local drag displacement.

localPosition

the event position relative to this node's top-left corner.