[][src]Struct pixel_widgets::widget::Context

pub struct Context<Message> { /* fields omitted */ }

Context for posting messages and requesting redraws of the ui.

Implementations

impl<Message> Context<Message>[src]

pub fn push(&mut self, message: Message)[src]

Push a message to the current [Model].

pub fn extend<I: IntoIterator<Item = Message>>(&mut self, iter: I)[src]

Push multiple messages to the current [Model] using an iterator.

pub fn redraw(&mut self)[src]

Request a redraw of the ui.

pub fn redraw_requested(&self) -> bool[src]

Returns the redraw flag.

pub fn cursor(&self) -> (f32, f32)[src]

Returns the cursor position

Trait Implementations

impl<Message> IntoIterator for Context<Message>[src]

type Item = Message

The type of the elements being iterated over.

type IntoIter = IntoIter<Message>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<Message> RefUnwindSafe for Context<Message> where
    Message: RefUnwindSafe
[src]

impl<Message> Send for Context<Message> where
    Message: Send
[src]

impl<Message> Sync for Context<Message> where
    Message: Sync
[src]

impl<Message> Unpin for Context<Message> where
    Message: Unpin
[src]

impl<Message> UnwindSafe for Context<Message> where
    Message: UnwindSafe
[src]

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

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, 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.