fn layout(&mut self, internal: &mut WidgetInternal<T>, complete: bool) {
        let do_layout = complete || internal.check(PARTIAL);

        if do_layout {
            self.layout.layout(&mut self.widgets_i, internal);

            self.decorator.update(internal);
        }

        self.widgets_i
            .iter_mut()
            .zip(self.widgets.iter_mut())
            .filter(|(w_internal, _)| do_layout || w_internal.check(LAYOUT))
            .for_each(|(w_internal, widget)| {
                w_internal.set_pivot(internal.absolute_pos());

                let backup = w_internal.flags;
                widget.layout(w_internal, complete);

                // DRAW | UPDATE & LAYOUT | PREV_LAYOUT
                w_internal.turn(DRAW, w_internal.check(VISIBLE));
                internal.on(w_internal.drain(0b00000110, 0b11_00000000));

                w_internal.replace(HANDLERS, backup);
            });

        self.focus_check(internal);

        internal.off(PARTIAL_TURN);
    }
/// Apply the Layout to the list, calculate the absolute position and update the Decorator
Apply the Layout to the list, calculate the absolute position and update the Decorator
Apply the Layout to the list calculate the absolute position and update the Decorator
fn layout(&mut self, internal: &mut WidgetInternal<T>, complete: bool) {
        let do_layout = complete || internal.check(PARTIAL);
        if do_layout {
            self.layout.layout(&mut self.widgets_i, internal);
            self.decorator.update(internal);
        }
        self.widgets_i
            .iter_mut()
            .zip(self.widgets.iter_mut())
            .filter(|(w_internal, _)| do_layout || w_internal.check(LAYOUT))
            .for_each(|(w_internal, widget)| {
                w_internal.set_pivot(internal.absolute_pos());
                let backup = w_internal.flags;
                widget.layout(w_internal, complete);
                // DRAW | UPDATE & LAYOUT | PREV_LAYOUT
                w_internal.turn(DRAW, w_internal.check(VISIBLE));
                internal.on(w_internal.drain(0b00000110, 0b11_00000000));
                w_internal.replace(HANDLERS, backup);
            });
        self.focus_check(internal);
        internal.off(PARTIAL_TURN);
    }
fn layout ( & mut self , internal : & mut WidgetInternal < T > , complete : bool ) { let do_layout = complete || internal . check ( PARTIAL ) ; if do_layout { self . layout . layout ( & mut self . widgets_i , internal ) ; self . decorator . update ( internal ) ; } self . widgets_i . iter_mut ( ) . zip ( self . widgets . iter_mut ( ) ) . filter ( | ( w_internal , _ ) | do_layout || w_internal . check ( LAYOUT ) ) . for_each ( | ( w_internal , widget ) | { w_internal . set_pivot ( internal . absolute_pos ( ) ) ; let backup = w_internal . flags ; widget . layout ( w_internal , complete ) ; // DRAW | UPDATE & LAYOUT | PREV_LAYOUT w_internal . turn ( DRAW , w_internal . check ( VISIBLE ) ) ; internal . on ( w_internal . drain ( 0b00000110 , 0b11_00000000 ) ) ; w_internal . replace ( HANDLERS , backup ) ; } ) ; self . focus_check ( internal ) ; internal . off ( PARTIAL_TURN ) ; }
Apply the Layout to the list, calculate the absolute position and update the Decorator
Apply the Layout to the list calculate the absolute position and update the Decorator
&mut self
internal
&mut WidgetInternal<T>
complete
bool
&mut self
internal
&mut WidgetInternal<T>
complete
bool