nano-ui
Safe HaskellNone
LanguageGHC2024

NanoUI.Frame.Hit

Description

Layout hit testing for modals, windows, and overlay stacking.

Synopsis

Documentation

widgetIdInSubtree :: Context -> NodeIdx -> WidgetId -> IO Bool Source #

Membership predicate for an already-resolved subtree root. Callers filtering many widgets can resolve the root once for the whole operation.

nodeInteractionHit :: Context -> NodeIdx -> Rect -> V2 -> IO Bool Source #

Hit test during UI build (before applyScrollOffsets). Uses prev rects and scroll viewport clips only, not per-node live clips.