pub fn dispatch_event_to_target<A: 'static>(
tree: &ElementTree<A>,
runtime: RuntimeHandle<A>,
target: ElementId,
event: &Event,
)Expand description
Synchronously dispatches an event to one retained widget without bubbling.
Unknown targets, non-widget elements, and elements without committed layout
are silently ignored. Widget callbacks receive absolute logical-pixel paint
bounds and an EventCtx without host event metadata.
ยงExamples
use ailloli_ui_core::{event::{Event, FocusEvent}, ElementId};
use ailloli_ui_runtime::{app::RuntimeHandle, element::ElementTree, input::dispatch_event_to_target};
let tree = ElementTree::<()>::new();
// A stale ID is a defined no-op.
dispatch_event_to_target(&tree, RuntimeHandle::new(), ElementId(7), &Event::Focus(FocusEvent::new(true)));