Enum nannou_conrod::Input[][src]

pub enum Input {
    Press(Button),
    Release(Button),
    Resize(f64f64),
    Motion(Motion),
    Touch(Touch),
    Text(String),
    Focus(bool),
    Redraw,
}
Expand description

The event type that is used by conrod to track inputs from the world. Events yielded by polling window backends should be converted to this type. This can be thought of as the event type which is supplied by the window backend to drive the state of the Ui forward.

This type is solely used within the Ui::handle_event method. The Input events are interpreted to create higher level Events (such as DoubleClick, WidgetCapturesKeyboard, etc) which are stored for later processing by Widgets, which will occur during the call to Ui::set_widgets.

Note: Input events that contain co-ordinates must be oriented with (0, 0) at the middle of the window with the y axis pointing upwards (Cartesian co-ordinates). All co-ordinates and dimensions must be given as Scalar (DPI agnostic) values. Many windows provide coordinates with the origin in the top left with y pointing down, so you might need to translate these co-ordinates when converting to this event. Also be sure to invert the y axis of MouseScroll events.

Variants

Press(Button)

A button on some input device was pressed.

Tuple Fields of Press

0: Button
Release(Button)

A button on some input device was released.

Tuple Fields of Release

0: Button
Resize(f64f64)

The window was received to the given dimensions.

Tuple Fields of Resize

0: f641: f64
Motion(Motion)

Some motion input was received (e.g. moving mouse or joystick axis).

Tuple Fields of Motion

0: Motion
Touch(Touch)

Input from a touch surface/screen.

Tuple Fields of Touch

0: Touch
Text(String)

Text input was received, usually via the keyboard.

Tuple Fields of Text

0: String
Focus(bool)

The window was focused or lost focus.

Tuple Fields of Focus

0: bool
Redraw

The backed requested to redraw.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.