Skip to main content

dispatch_event_dyn

Function dispatch_event_dyn 

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

Variant of dispatch_event that accepts &mut dyn Widget as the root. Useful when a parent owns a sub-tree by concrete type (e.g. Window’s title_bar: WindowTitleBar) and wants to route an event into it via the framework’s standard hit-test + bubble dispatch, instead of running coordinate hit-tests inline.