This commit is contained in:
🪞👃🪞 2024-07-03 00:08:41 +03:00
parent 3ae2467acc
commit 94c1f83ef2
13 changed files with 277 additions and 124 deletions

View file

@ -1,5 +1,17 @@
use crate::core::*;
pub struct Stack<'a>(pub &'a[Box<dyn Render>]);
impl<'a> Render for Stack<'a> {
fn render (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
let mut area2 = area.clone();
for layer in self.0.iter() {
area2 = layer.render(buf, area2)?;
}
Ok(area)
}
}
pub struct Column(pub Vec<Box<dyn Device>>);
pub struct Row(pub Vec<Box<dyn Device>>);