pub fn register_handler(&mut self, widget: Entity, handler: Rc<dyn EventHandler>) {
        if !self.handlers.contains_key(&widget) {
            self.handlers.insert(widget, vec![]);
        }

        self.handlers.get_mut(&widget).unwrap().push(handler);
    }
/// Registers a event handler with a widget.
Registers a event handler with a widget.
Registers a event handler with a widget .
pub fn register_handler(&mut self, widget: Entity, handler: Rc<dyn EventHandler>) {
        if !self.handlers.contains_key(&widget) {
            self.handlers.insert(widget, vec![]);
        }
        self.handlers.get_mut(&widget).unwrap().push(handler);
    }
pub fn register_handler ( & mut self , widget : Entity , handler : Rc < dyn EventHandler > ) { if ! self . handlers . contains_key ( & widget ) { self . handlers . insert ( widget , vec ! [ ] ) ; } self . handlers . get_mut ( & widget ) . unwrap ( ) . push ( handler ) ; }
Registers a event handler with a widget.
Registers a event handler with a widget .
&mut self
widget
Entity
handler
Rc<dyn EventHandler>
&mut self
widget
Entity
handler
Rc<dyn EventHandler>