Enum conrod::event::Input [] [src]

pub enum Input {
    Press(Button),
    Release(Button),
    Resize(u32u32),
    Motion(Motion),
    Touch(Touch),
    Text(String),
    Focus(bool),
}

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

A button on some input device was pressed.

A button on some input device was released.

The window was received to the given dimensions.

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

Input from a touch surface/screen.

Text input was received, usually via the keyboard.

The window was focused or lost focus.

Trait Implementations

impl Clone for Input
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Input
[src]

Formats the value using the given formatter.

impl PartialEq for Input
[src]

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

This method tests for !=.

impl From<Motion> for Input
[src]

Performs the conversion.

impl From<Touch> for Input
[src]

Performs the conversion.