fn remove_tab_internal(&mut self, ctx: &mut Context, body: Entity) {
        if let Some(index) = self.get_index(body) {
            //Pop the index tab out of the stored tabs
            let (header, body) = self.tabs.remove(index);

            //Push button to the header container
            ctx.remove_child_from(header, self.header_container);

            //Push the body to the body container
            ctx.remove_child_from(body, self.body_container);

            //If there is at least one tab
            if !self.tabs.is_empty() {
                //If selected is greater than tab count, select the last one
                if self.selected >= self.tabs.len() {
                    self.selected = self.tabs.len() - 1;
                }

                //Only update current selection if the removed tab is lesser than the selected.
                //If it is greater, there is no need to update, but simply remove the target tab
                if index <= self.selected {
                    self.refresh_selected_tab(ctx);
                }
            }
        }
    }
///Remove a tab from the widget. Unlike the public "remove_tab", this happen immediatly.
Remove a tab from the widget. Unlike the public "remove_tab", this happen immediatly.
Remove a tab from the widget . Unlike the public " remove_tab " this happen immediatly .
fn remove_tab_internal(&mut self, ctx: &mut Context, body: Entity) {
        if let Some(index) = self.get_index(body) {
            //Pop the index tab out of the stored tabs
            let (header, body) = self.tabs.remove(index);
            //Push button to the header container
            ctx.remove_child_from(header, self.header_container);
            //Push the body to the body container
            ctx.remove_child_from(body, self.body_container);
            //If there is at least one tab
            if !self.tabs.is_empty() {
                //If selected is greater than tab count, select the last one
                if self.selected >= self.tabs.len() {
                    self.selected = self.tabs.len() - 1;
                }
                //Only update current selection if the removed tab is lesser than the selected.
                //If it is greater, there is no need to update, but simply remove the target tab
                if index <= self.selected {
                    self.refresh_selected_tab(ctx);
                }
            }
        }
    }
fn remove_tab_internal ( & mut self , ctx : & mut Context , body : Entity ) { if let Some ( index ) = self . get_index ( body ) { //Pop the index tab out of the stored tabs let ( header , body ) = self . tabs . remove ( index ) ; //Push button to the header container ctx . remove_child_from ( header , self . header_container ) ; //Push the body to the body container ctx . remove_child_from ( body , self . body_container ) ; //If there is at least one tab if ! self . tabs . is_empty ( ) { //If selected is greater than tab count, select the last one if self . selected >= self . tabs . len ( ) { self . selected = self . tabs . len ( ) - 1 ; } //Only update current selection if the removed tab is lesser than the selected. //If it is greater, there is no need to update, but simply remove the target tab if index <= self . selected { self . refresh_selected_tab ( ctx ) ; } } } }
Remove a tab from the widget.
Remove a tab from the widget .
&mut self
ctx
&mut Context
body
Entity