[−][src]Trait gui::Handleable
A trait representing an object capable of handling events.
Provided methods
fn handle(&mut self, event: E, cap: &mut dyn MutCap<E>) -> Option<UiEvents<E>>
Handle an Event
.
The widget has the option to either consume the event and return nothing, in which no one else will get informed about it, forward it directly (the default behavior), in which case the its parent widget will receive it, or return a completely different event.
fn handle_custom(
&mut self,
event: Box<dyn Any>,
cap: &mut dyn MutCap<E>
) -> Option<UiEvents<E>>
&mut self,
event: Box<dyn Any>,
cap: &mut dyn MutCap<E>
) -> Option<UiEvents<E>>
Handle a custom event.
fn handle_custom_ref(
&mut self,
event: &mut dyn Any,
cap: &mut dyn MutCap<E>
) -> Option<UiEvents<E>>
&mut self,
event: &mut dyn Any,
cap: &mut dyn MutCap<E>
) -> Option<UiEvents<E>>
Handle a custom event without transferring ownership of it.