Enum pixel_widgets::event::Event[][src]

pub enum Event {
    Press(Key),
    Release(Key),
    Modifiers(Modifiers),
    Resize(f32f32),
    Motion(f32f32),
    Cursor(f32f32),
    Scroll(f32f32),
    Text(char),
    Focus(bool),
    Exit,
}
Expand description

A user input event.

Variants

Press(Key)

A button on some input device was pressed.

Tuple Fields of Press

0: Key
Release(Key)

A button on some input device was released.

Tuple Fields of Release

0: Key
Modifiers(Modifiers)

Modifiers were changed.

Tuple Fields of Modifiers

0: Modifiers
Resize(f32f32)

The window was resized to the given dimensions.

Tuple Fields of Resize

0: f321: f32
Motion(f32f32)

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

Tuple Fields of Motion

0: f321: f32
Cursor(f32f32)

The mouse cursor was moved to a location.

Tuple Fields of Cursor

0: f321: f32
Scroll(f32f32)

The mouse wheel or touchpad scroll gesture sent us some scroll event.

Tuple Fields of Scroll

0: f321: f32
Text(char)

Text input was received, usually via the keyboard.

Tuple Fields of Text

0: char
Focus(bool)

The window was focused or lost focus.

Tuple Fields of Focus

0: bool
Exit

The application exited it’s main event loop

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. 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.