/// Step the focus id to the next widget that returns true on the function
Step the focus id to the next widget that returns true on the function
Step the focus id to the next widget that returns true on the function
fn step_focus(&mut self, internal: &mut WidgetInternal<T>, back: bool) -> bool {
        let step_check = {
            if !self.widgets.is_empty() {
                if let Some(id) = self.focus_id {
                    let w_internal = &mut self.widgets_i[id];
                    let widget = &mut self.widgets[id];
                    let focus = widget.step_focus(w_internal, back);
                    internal.on(w_internal.drain(REACTIVE, PREV_LAYOUT));
                    if focus {
                        return true;
                    } else {
                        widget.focus_out(w_internal);
                        internal.on(w_internal.drain(REACTIVE, DRAIN_FOCUS));
                    }
                }
                self.step(back);
                while let Some(id) = self.focus_id {
                    let w_internal = &mut self.widgets_i[id];
                    let focus = w_internal.check(0b00011000) // ENABLED | VISIBLE
                        && self.widgets[id].step_focus(w_internal, back);
                    internal.on(w_internal.drain(REACTIVE, PREV_LAYOUT));
                    if focus {
                        w_internal.on(FOCUS);
                        return focus;
                    } else {
                        self.step(back);
                    }
                }
            }
            false
        };
        if internal.check(PREV_LAYOUT) {
            internal.off_on(PREV_LAYOUT, PARTIAL_TURN);
        }
        step_check
    }
fn step_focus ( & mut self , internal : & mut WidgetInternal < T > , back : bool ) -> bool { let step_check = { if ! self . widgets . is_empty ( ) { if let Some ( id ) = self . focus_id { let w_internal = & mut self . widgets_i [ id ] ; let widget = & mut self . widgets [ id ] ; let focus = widget . step_focus ( w_internal , back ) ; internal . on ( w_internal . drain ( REACTIVE , PREV_LAYOUT ) ) ; if focus { return true ; } else { widget . focus_out ( w_internal ) ; internal . on ( w_internal . drain ( REACTIVE , DRAIN_FOCUS ) ) ; } } self . step ( back ) ; while let Some ( id ) = self . focus_id { let w_internal = & mut self . widgets_i [ id ] ; let focus = w_internal . check ( 0b00011000 ) // ENABLED | VISIBLE && self . widgets [ id ] . step_focus ( w_internal , back ) ; internal . on ( w_internal . drain ( REACTIVE , PREV_LAYOUT ) ) ; if focus { w_internal . on ( FOCUS ) ; return focus ; } else { self . step ( back ) ; } } } false } ; if internal . check ( PREV_LAYOUT ) { internal . off_on ( PREV_LAYOUT , PARTIAL_TURN ) ; } step_check }
Step the focus id to the next widget that returns true on the function
Step the focus id to the next widget that returns true on the function
&mut self
internal
&mut WidgetInternal<T>
back
bool