Trait sauron::Widget [−][src]
pub trait Widget<MSG, PMSG> { fn update(&mut self, msg: MSG) -> (Vec<MSG, Global>, Vec<PMSG, Global>); fn view(
&self
) -> Node<&'static str, &'static str, &'static str, AttributeValue<MSG>>; }
Expand description
A widget has the same capability to a Component. Paren component of a widget can listen to widget events.
It has a view of it’s own and can update itself. It can return an Optional Msg to update itself on the next update loop. Additionally, it can trigger listeners that is hook from the parent component that uses it.
Required methods
update this widget with the msg. can optionally return a Msg for the next update.
The Vec