fn handle_keys(&mut self, internal: &mut WidgetInternal<T>, key: KeyState) {
        if let Some(id) = self.focus_id {
            let w_internal = &mut self.widgets_i[id];
            let widget = &mut self.widgets[id];
            let backup = w_internal.flags;

            widget.handle_keys(w_internal, key);
            internal.on(w_internal.drain(REACTIVE, PREV_LAYOUT));

            // HOVER | GRAB
            w_internal.replace(0b01100000, backup);

            if !w_internal.check(FOCUSABLE) {
                widget.focus_out(w_internal);
                internal.on(w_internal.drain(REACTIVE, DRAIN_FOCUS));

                self.focus_id = None;
            }

            if internal.check(PREV_LAYOUT) {
                internal.off_on(PREV_LAYOUT, PARTIAL_TURN);
            }
        }
    }
/// Call the function of the focused widget
Call the function of the focused widget
Call the function of the focused widget
fn handle_keys(&mut self, internal: &mut WidgetInternal<T>, key: KeyState) {
        if let Some(id) = self.focus_id {
            let w_internal = &mut self.widgets_i[id];
            let widget = &mut self.widgets[id];
            let backup = w_internal.flags;
            widget.handle_keys(w_internal, key);
            internal.on(w_internal.drain(REACTIVE, PREV_LAYOUT));
            // HOVER | GRAB
            w_internal.replace(0b01100000, backup);
            if !w_internal.check(FOCUSABLE) {
                widget.focus_out(w_internal);
                internal.on(w_internal.drain(REACTIVE, DRAIN_FOCUS));
                self.focus_id = None;
            }
            if internal.check(PREV_LAYOUT) {
                internal.off_on(PREV_LAYOUT, PARTIAL_TURN);
            }
        }
    }
fn handle_keys ( & mut self , internal : & mut WidgetInternal < T > , key : KeyState ) { if let Some ( id ) = self . focus_id { let w_internal = & mut self . widgets_i [ id ] ; let widget = & mut self . widgets [ id ] ; let backup = w_internal . flags ; widget . handle_keys ( w_internal , key ) ; internal . on ( w_internal . drain ( REACTIVE , PREV_LAYOUT ) ) ; // HOVER | GRAB w_internal . replace ( 0b01100000 , backup ) ; if ! w_internal . check ( FOCUSABLE ) { widget . focus_out ( w_internal ) ; internal . on ( w_internal . drain ( REACTIVE , DRAIN_FOCUS ) ) ; self . focus_id = None ; } if internal . check ( PREV_LAYOUT ) { internal . off_on ( PREV_LAYOUT , PARTIAL_TURN ) ; } } }
Call the function of the focused widget
Call the function of the focused widget
&mut self
internal
&mut WidgetInternal<T>
key
KeyState
&mut self
internal
&mut WidgetInternal<T>
key
KeyState