Draft widget nodes and wire interaction

This commit is contained in:
Héctor Ramón Jiménez 2019-09-15 17:43:15 +02:00
parent 27ac85a9d9
commit 8834772fa7
10 changed files with 223 additions and 22 deletions

View file

@ -1,3 +1,6 @@
use crate::Bus;
use dodrio::bumpalo;
pub mod button;
pub mod slider;
pub mod text;
@ -17,4 +20,14 @@ pub use row::Row;
pub use slider::Slider;
pub use text::Text;
pub trait Widget<Message> {}
pub trait Widget<Message> {
fn node<'b>(
&self,
bump: &'b bumpalo::Bump,
_bus: &Bus<Message>,
) -> dodrio::Node<'b> {
use dodrio::builder::*;
div(bump).children(vec![text("WIP")]).finish()
}
}