[][src]Trait guion::event::Event

pub trait Event<E>: Sized + Clone where
    E: Env,
    E::Backend: Backend<E, Event = Self>, 
{ type Dest: Destination; type Key: Key; fn filter(self, bounds: &Bounds) -> Option<Self>;
fn consuming(&self) -> bool;
fn destination(&self) -> Self::Dest;
fn position(&self) -> Option<Offset>;
fn _root_only(&self) -> bool; fn filter_cloned(&self, bounds: &Bounds) -> Option<Self> { ... }
fn from<V: Variant<E>>(v: V) -> Self
    where
        Self: VariantSupport<V, E>
, { ... }
fn is<V: Variant<E>>(&self) -> Option<V>
    where
        Self: VariantSupport<V, E>
, { ... } }

an Event holds one of the support Variant and can be downcasted to a specific Variant

Associated Types

type Dest: Destination

type Key: Key

Loading content...

Required methods

fn filter(self, bounds: &Bounds) -> Option<Self>

fn consuming(&self) -> bool

True if container widgets should sent this to only one widget

fn destination(&self) -> Self::Dest

Where there Event should be initially injected into the context

fn position(&self) -> Option<Offset>

fn _root_only(&self) -> bool

Loading content...

Provided methods

fn filter_cloned(&self, bounds: &Bounds) -> Option<Self>

fn from<V: Variant<E>>(v: V) -> Self where
    Self: VariantSupport<V, E>, 

Create the event from a variant

fn is<V: Variant<E>>(&self) -> Option<V> where
    Self: VariantSupport<V, E>, 

Try to cast the Event as a specific variant. Use this for filtering and reading events

Loading content...

Implementors

impl<E, K, D> Event<E> for DynEvent<E, K, D> where
    E: Env,
    E::Backend: Backend<E, Event = Self>,
    D: Destination,
    K: Key
[src]

type Dest = D

type Key = K

Loading content...