[−][src]Enum conrod_core::event::Input
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 Event
s (such as DoubleClick, WidgetCapturesKeyboard, etc)
which are stored for later processing by Widget
s, 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.
Release(Button)
A button on some input device was released.
The window was received to the given dimensions.
Motion(Motion)
Some motion input was received (e.g. moving mouse or joystick axis).
Touch(Touch)
Input from a touch surface/screen.
Text(String)
Text input was received, usually via the keyboard.
Focus(bool)
The window was focused or lost focus.
The backed requested to redraw.
Trait Implementations
impl Clone for Input
[src]
impl Debug for Input
[src]
impl From<Input> for Event
[src]
impl From<Motion> for Input
[src]
impl From<Touch> for Input
[src]
impl PartialEq<Input> for Input
[src]
impl StructuralPartialEq for Input
[src]
Auto Trait Implementations
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,