pub(crate) fn render<B: tui::backend::Backend>(
        &mut self,
        frame: &mut Frame<B>,
        area: Rect,
        focus: FocusState,
    ) {
        let border_style = Style::default().fg(focus.border_color());
        let groupnames_block = Block::default()
            .borders(Borders::ALL)
            .style(Style::default().fg(focus.text_color()))
            .title("Groups")
            .border_type(BorderType::Plain)
            .border_style(border_style);

        let groupnames_items: Vec<_> = (0..self.num_groups)
            .map(|idx| {
                ListItem::new(Spans::from(vec![Span::styled(
                    format!("Group #{}", idx.to_string()),
                    Style::default(),
                )]))
            })
            .collect();

        let groupnames_list = List::new(groupnames_items)
            .block(groupnames_block)
            .highlight_style(
                Style::default()
                    .bg(focus.sel_color())
                    .fg(Color::Black)
                    .add_modifier(Modifier::BOLD),
            );
        frame.render_stateful_widget(groupnames_list, area, &mut self.list_state);
    }
//TODO: remove groups, maybe keep a copy
remove groups, maybe keep a copy
remove groups maybe keep a copy
pub(crate) fn render<B: tui::backend::Backend>(
        &mut self,
        frame: &mut Frame<B>,
        area: Rect,
        focus: FocusState,
    ) {
        let border_style = Style::default().fg(focus.border_color());
        let groupnames_block = Block::default()
            .borders(Borders::ALL)
            .style(Style::default().fg(focus.text_color()))
            .title("Groups")
            .border_type(BorderType::Plain)
            .border_style(border_style);
        let groupnames_items: Vec<_> = (0..self.num_groups)
            .map(|idx| {
                ListItem::new(Spans::from(vec![Span::styled(
                    format!("Group #{}", idx.to_string()),
                    Style::default(),
                )]))
            })
            .collect();
        let groupnames_list = List::new(groupnames_items)
            .block(groupnames_block)
            .highlight_style(
                Style::default()
                    .bg(focus.sel_color())
                    .fg(Color::Black)
                    .add_modifier(Modifier::BOLD),
            );
        frame.render_stateful_widget(groupnames_list, area, &mut self.list_state);
    }
pub ( crate ) fn render < B : tui :: backend :: Backend > ( & mut self , frame : & mut Frame < B > , area : Rect , focus : FocusState , ) { let border_style = Style :: default ( ) . fg ( focus . border_color ( ) ) ; let groupnames_block = Block :: default ( ) . borders ( Borders :: ALL ) . style ( Style :: default ( ) . fg ( focus . text_color ( ) ) ) . title ( " " ) . border_type ( BorderType :: Plain ) . border_style ( border_style ) ; let groupnames_items : Vec < _ > = ( 0 .. self . num_groups ) . map ( | idx | { ListItem :: new ( Spans :: from ( vec ! [ Span styled ( format ( " " idx to_string ( ) ) Style default ( ) ) ] ) ) } ) . collect ( ) ; let groupnames_list = List :: new ( groupnames_items ) . block ( groupnames_block ) . highlight_style ( Style :: default ( ) . bg ( focus . sel_color ( ) ) . fg ( Color :: Black ) . add_modifier ( Modifier :: BOLD ) , ) ; frame . render_stateful_widget ( groupnames_list , area , & mut self . list_state ) ; }
TODO: remove groups, maybe keep a copy
TODO : remove groups maybe keep a copy
&mut self
frame
&mut Frame<B>
area
Rect
focus
FocusState
&mut self
frame
&mut Frame<B>
area
Rect
focus
FocusState