Trait gui::Handleable

source ·
pub trait Handleable {
    fn handle(&mut self, event: Event, cap: &mut dyn Cap) -> Option<UiEvents> { ... }
    fn handle_custom(
        &mut self,
        event: Box<dyn Any>,
        cap: &mut dyn Cap
    ) -> Option<UiEvents> { ... } fn handle_custom_ref(
        &mut self,
        event: &mut dyn Any,
        cap: &mut dyn Cap
    ) -> Option<UiEvents> { ... } }
Expand description

A trait representing an object capable of handling events.

Provided Methods

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.

Handle a custom event.

Handle a custom event without transferring ownership of it.

Implementors