use crate::prelude::*; pub struct Launcher { name: String } impl Launcher { pub fn new (name: &str) -> Result, Box> { Ok(DynamicDevice::new(render, handle, Self { name: name.into(), })) } } pub fn process ( client: &Client, scope: &ProcessScope ) -> Control { Control::Continue } pub fn render (state: &Launcher, buf: &mut Buffer, area: Rect) -> Usually { Ok(Rect::default()) } pub fn handle (state: &mut Launcher, event: &Event) -> Result<(), Box> { Ok(()) } //let mut x = areas[1].x; //for (index, track) in [ //"Track 1", //"Track 2", //"Track 3", //"Track 4", //"Track 5", //"Bus 1", //"Bus 2", //"Mix", //].iter().enumerate() { //buffer.set_string( //x + 10 * (index + 1) as u16, areas[1].y, //"┬", Style::default().not_bold().dim() //); //buffer.set_string( //x + 10 * (index + 1) as u16, areas[1].y + areas[1].height - 1, //"┴", Style::default().not_bold().dim() //); //for y in areas[1].y+1..areas[1].y+areas[1].height - 1 { //buffer.set_string( //x + 10 * (index + 1) as u16, y, //"│", Style::default().not_bold().gray().dim() //); //} //for y in areas[1].y+2..areas[1].y+areas[1].height - 1 { //buffer.set_string( //x + 10 * index as u16 + 1, y, //"--------", Style::default().not_bold().gray().dim() //); //} //buffer.set_string( //x + 10 * index as u16 + 1, areas[1].y + 1, //track, Style::default().bold().not_dim() //); //}