ink-cartridge
    Preparing search index...

    Type Alias MouseRegionCallbacks

    Callbacks fired when a mouse event hits the registered region.

    The second argument is the region rect the event hit — useful for converting the event coordinates back into local cell positions.

    type MouseRegionCallbacks = {
        onClick?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
        onDragEnd?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
        onDragMove?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
        onDragStart?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
        onEnter?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
        onLeave?: (event: XtermMouseEvent) => void;
        onWheel?: (event: XtermMouseEvent, region: MouseRegionRect) => void;
    }
    Index
    onClick?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired when a click event hits the region.

    onDragEnd?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired on release after a drag (no-op for plain clicks).

    onDragMove?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired on every drag event while dragging.

    onDragStart?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired on the first drag event after pressing inside the region — i.e. when a press turned into a real drag. The target is captured from the press, so the drag keeps firing even when the cursor leaves the region.

    onEnter?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired when the mouse starts hovering the region (move event hit).

    onLeave?: (event: XtermMouseEvent) => void

    Fired when the mouse leaves the region (previous hover target).

    onWheel?: (event: XtermMouseEvent, region: MouseRegionRect) => void

    Fired when a wheel event hits the region. event.button narrows to 'wheel-up' | 'wheel-down' | 'wheel-left' | 'wheel-right'.