Struct nannou::ui::input::Global[][src]

pub struct Global {
    pub start: State,
    pub current: State,
    pub last_click: Option<(Instant, Click)>,
    // some fields omitted
}

Global input event handler that also implements input::Provider. The Ui passes all events to it’s Global instance, which aggregates and interprets the events to provide so-called ‘high-level’ events to widgets. This input gets reset after every update by the Ui.

Fields

start: State

The input::State as it was at the end of the last update cycle.

current: State

The most recent input::State, with updates from handling all the events this update cycle

last_click: Option<(Instant, Click)>

Tracks the last click that occurred and the time at which it occurred in order to create double-click events.

Implementations

impl Global[src]

pub fn new() -> Global[src]

Returns a fresh new Global

pub fn events(&self) -> Events<'_>

Notable traits for Events<'a>

impl<'a> Iterator for Events<'a> type Item = &'a Event;
[src]

Returns an iterator yielding all events that have occurred since the last time Ui::set_widgets was called.

pub fn push_event(&mut self, event: Event)[src]

Add the new event to the stack.

pub fn clear_events_and_update_start_state(&mut self)[src]

Called at the end of every update cycle in order to prepare the Global to handle events for the next one.

Trait Implementations

impl Debug for Global[src]

Auto Trait Implementations

impl RefUnwindSafe for Global

impl Send for Global

impl Sync for Global

impl Unpin for Global

impl UnwindSafe for Global

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,