mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: layout split
This commit is contained in:
parent
c72f7c6f4b
commit
214061a419
3 changed files with 159 additions and 41 deletions
|
|
@ -62,6 +62,12 @@ pub trait Render: Send {
|
|||
}
|
||||
}
|
||||
|
||||
impl Render for () {
|
||||
fn render (&self, b: &mut Buffer, a: Rect) -> Usually<Rect> {
|
||||
Ok(Rect { x: a.x, y: a.y, width: 0, height: 0 })
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Fn(&mut Buffer, Rect) -> Usually<Rect> + Send> Render for T {
|
||||
fn render (&self, b: &mut Buffer, a: Rect) -> Usually<Rect> {
|
||||
(*self)(b, a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue