better element structure

This commit is contained in:
2024-11-30 21:00:02 +01:00
parent 71d10bc331
commit 1eef3d4306
6 changed files with 64 additions and 19 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ pub trait ElementCore {
}
pub trait ElementWidget: ElementCore + std::fmt::Debug + Send + Sync {
fn render(&self, focused: bool) -> Option<RenderResult>;
fn render(&self, focused: bool, width: usize, height: usize) -> RenderResult;
fn event(&mut self, event: crossterm::event::Event, document: &Document) {
_ = (event, document)
}