Struct nannou::ui::input::widget::Widget[][src]

pub struct Widget<'a> { /* fields omitted */ }
Expand description

Provides only events and input state that are relevant to a specific widget.

This type can be produced by calling the UiCell::input method with the target widget’s widget::Id. This is particularly useful

Unlike input::Global, input::Widget methods are tailored to the widget for which they are produced.

Implementations

Returns a Widget with events specifically for the given widget.

Filters out only the events that directly pertain to the widget.

All events will also be made relative to the widget’s own (0, 0) origin.

If the widget is currently capturing the mouse, this returns the state of the mouse.

Returns None if the widget is not capturing the mouse.

Produces an iterator yielding all events that are relevant to a specific widget.

All events provided by this Iterator will be filtered in accordance with input capturing. For example: If the widget does not capture the mouse, it will not receive any mouse-related events. If the widget captures the keyboard it will receive all keyboard events.

All mouse events will have their coordinates relative to the middle of the widget’s Rect.

Filters all events yielded by Self::events other than event::Presses.

Filters all events yielded by Self::events other than event::Releasees.

Filters all events yielded by Self::events for all event::Clicks.

A click is determined to have occured if a pointing device button was both pressed and released over the widget.

Filters all events yielded by Self::events for all event::Taps.

A tap is determined to have occured if a touch interaction both started and ended over the widget.

Produces an iterator that yields all event::Drag events yielded by the Events iterator.

Only events that occurred while the widget was capturing the device that did the dragging will be yielded.

Produces an iterator that yields all Input::Text events that have occurred as &strs since the last time Ui::set_widgets was called.

Only events that occurred while the widget was capturing the keyboard will be yielded.

Produce an iterator that yields only the Scroll events yielded by the Events iterator.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.