Use frame stack instead of explicit pos and size parameters

This commit is contained in:
Joscha 2022-07-13 11:34:31 +02:00
parent 44470b973d
commit 9aed0a3cee
9 changed files with 22 additions and 15 deletions

View file

@ -10,5 +10,5 @@ use toss::frame::{Frame, Pos, Size};
pub trait Widget {
fn size(&self, frame: &mut Frame, max_width: Option<u16>, max_height: Option<u16>) -> Size;
async fn render(self: Box<Self>, frame: &mut Frame, pos: Pos, size: Size);
async fn render(self: Box<Self>, frame: &mut Frame);
}