Function hit_test_overlay_target

Source
pub fn hit_test_overlay_target<A>(
    tree: &ElementTree<A>,
    pos: Point,
) -> Option<ElementId>
Expand description

Hit-tests only retained overlay regions, preserving their paint z-order.

Popup routing uses this as backend-confirmed evidence before the first paint has committed global popup bounds to the semantic portal. Overlay rectangles are element-local logical pixels translated by retained absolute bounds. They are searched later-child-first and are not constrained by the normal bounds/clip pass. Only widget owners can be returned.

ยงExamples

use ailloli_ui_core::Point;
use ailloli_ui_runtime::{element::{ElementKind, ElementTree}, input::hit_test_overlay_target, layout::LayoutResult};
let mut tree = ElementTree::<()>::new();
let root = tree.create_element(ElementKind::Empty, None, None);
tree.get_mut(root).unwrap().layout = Some(LayoutResult::empty());
assert_eq!(hit_test_overlay_target(&tree, Point::new(0.0, 0.0)), None);