mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
placebo
This commit is contained in:
parent
3ae2467acc
commit
94c1f83ef2
13 changed files with 277 additions and 124 deletions
|
|
@ -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>>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue