fn draw_ui(
        &mut self,
        terminal: &mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>,
    ) -> Result<()> {
        terminal.draw(|frame| {
            let main_chunks = Layout::default()
                .direction(Direction::Vertical)
                .constraints([Constraint::Percentage(67), Constraint::Min(5)].as_ref())
                .split(frame.size());

            let io_chunks = Layout::default()
                .direction(Direction::Horizontal)
                .constraints([Constraint::Percentage(40), Constraint::Min(10)])
                .split(main_chunks[0]);

            draw_input_panel(frame, &mut self.input_state, io_chunks[0]);
            draw_output_panel(frame, &mut self.output_state, io_chunks[1]);
            draw_smart_logger(frame, main_chunks[1], &self.tui_state, &self.tui_dispatcher);
        })?;
        Ok(())
    }
/// Using the state of the REPL, display information in the terminal window
Using the state of the REPL, display information in the terminal window
Using the state of the REPL display information in the terminal window
fn draw_ui(
        &mut self,
        terminal: &mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>,
    ) -> Result<()> {
        terminal.draw(|frame| {
            let main_chunks = Layout::default()
                .direction(Direction::Vertical)
                .constraints([Constraint::Percentage(67), Constraint::Min(5)].as_ref())
                .split(frame.size());
            let io_chunks = Layout::default()
                .direction(Direction::Horizontal)
                .constraints([Constraint::Percentage(40), Constraint::Min(10)])
                .split(main_chunks[0]);
            draw_input_panel(frame, &mut self.input_state, io_chunks[0]);
            draw_output_panel(frame, &mut self.output_state, io_chunks[1]);
            draw_smart_logger(frame, main_chunks[1], &self.tui_state, &self.tui_dispatcher);
        })?;
        Ok(())
    }
fn draw_ui ( & mut self , terminal : & mut Terminal < tui :: backend :: CrosstermBackend < std :: io :: Stdout > > , ) -> Result < ( ) > { terminal . draw ( | frame | { let main_chunks = Layout :: default ( ) . direction ( Direction :: Vertical ) . constraints ( [ Constraint :: Percentage ( 67 ) , Constraint :: Min ( 5 ) ] . as_ref ( ) ) . split ( frame . size ( ) ) ; let io_chunks = Layout :: default ( ) . direction ( Direction :: Horizontal ) . constraints ( [ Constraint :: Percentage ( 40 ) , Constraint :: Min ( 10 ) ] ) . split ( main_chunks [ 0 ] ) ; draw_input_panel ( frame , & mut self . input_state , io_chunks [ 0 ] ) ; draw_output_panel ( frame , & mut self . output_state , io_chunks [ 1 ] ) ; draw_smart_logger ( frame , main_chunks [ 1 ] , & self . tui_state , & self . tui_dispatcher ) ; } ) ? ; Ok ( ( ) ) }
Using the state of the REPL, display information in the terminal window
Using the state of the REPL display information in the terminal window
&mut self
terminal
&mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>
&mut self
terminal
&mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>