Add todos

This commit is contained in:
Joscha 2023-02-12 23:22:23 +01:00
parent 7e9e441c1e
commit fb164eeaa9
2 changed files with 4 additions and 0 deletions

View file

@ -51,6 +51,8 @@ enum Mode {
Log, Log,
} }
// TODO Add Error for anything that can go wrong while rendering
pub struct Ui { pub struct Ui {
event_tx: UnboundedSender<UiEvent>, event_tx: UnboundedSender<UiEvent>,

View file

@ -21,6 +21,8 @@ pub mod text;
use async_trait::async_trait; use async_trait::async_trait;
use toss::frame::{Frame, Size}; use toss::frame::{Frame, Size};
// TODO Add Error type and return Result-s (at least in Widget::render)
#[async_trait] #[async_trait]
pub trait Widget { pub trait Widget {
fn size(&self, frame: &mut Frame, max_width: Option<u16>, max_height: Option<u16>) -> Size; fn size(&self, frame: &mut Frame, max_width: Option<u16>, max_height: Option<u16>) -> Size;