pub trait Widget {
// Required methods
fn bounds(&self) -> Rect;
fn draw(&self, renderer: &mut dyn Renderer);
fn handle_event(&mut self, event: &Event) -> bool;
}
Expand description
Required Methods§
Sourcefn handle_event(&mut self, event: &Event) -> bool
fn handle_event(&mut self, event: &Event) -> bool
Handle an event and return true
if it was consumed.
The default implementation for most widgets will simply ignore the
event and return false
.