pub fn draw_children(&mut self) {

        // Clear the screen
        execute!(self.stdout, Clear(ClearType::All));

        // Update the grid's size
        self.update_grid_size();

        // For each child widget, calculate its positioning and size
        for child in &mut self.children {
            
            // Get the placement and size of the child
            let (x, y) = self.grid.get_placement_chars(child.get_x() as u8, child.get_y() as u8);
            let width = self.grid.get_column_chars(child.get_x() as u8);
            let height = self.grid.get_row_chars(child.get_y() as u8);
            println!("x×y {}×{}", x, y);
            println!("wxh {}x{}", size().unwrap().0, size().unwrap().1);

            // Place the child
            child.draw(x, y, width, height);
        }
    }
/// Draws all the child widgets based on the terminal's width and height
Draws all the child widgets based on the terminal's width and height
Draws all the child widgets based on the terminal ' s width and height
pub fn draw_children(&mut self) {
        // Clear the screen
        execute!(self.stdout, Clear(ClearType::All));
        // Update the grid's size
        self.update_grid_size();
        // For each child widget, calculate its positioning and size
        for child in &mut self.children {
            // Get the placement and size of the child
            let (x, y) = self.grid.get_placement_chars(child.get_x() as u8, child.get_y() as u8);
            let width = self.grid.get_column_chars(child.get_x() as u8);
            let height = self.grid.get_row_chars(child.get_y() as u8);
            println!("x×y {}×{}", x, y);
            println!("wxh {}x{}", size().unwrap().0, size().unwrap().1);
            // Place the child
            child.draw(x, y, width, height);
        }
    }
pub fn draw_children ( & mut self ) { // Clear the screen execute ! ( self stdout Clear ( ClearType All ) ) ; // Update the grid's size self . update_grid_size ( ) ; // For each child widget, calculate its positioning and size for child in & mut self . children { // Get the placement and size of the child let ( x , y ) = self . grid . get_placement_chars ( child . get_x ( ) as u8 , child . get_y ( ) as u8 ) ; let width = self . grid . get_column_chars ( child . get_x ( ) as u8 ) ; let height = self . grid . get_row_chars ( child . get_y ( ) as u8 ) ; println ! ( " ; println ! ( " " size ( ) unwrap ( ) 0 size ( ) unwrap ( ) 1 ) ; // Place the child child . draw ( x , y , width , height ) ; } }
Draws all the child widgets based on the terminal's width and height
Draws all the child widgets based on the terminal ' s width and height
&mut self
&mut self