Skip to main content

dispatch_event

Function dispatch_event 

Source
pub fn dispatch_event(
    root: &mut Box<dyn Widget>,
    path: &[usize],
    event: &Event,
    pos_in_root: Point,
) -> EventResult
Expand description

Dispatch event through a path (list of child indices from the root). The event bubbles leaf → root; returns Consumed if any widget consumed it.

pos_in_root is the event position in the root widget’s coordinate space. The function translates it down through each level of the path.