Enum conrod::event::Input
[−]
[src]
pub enum Input { Press(Button), Release(Button), Move(Motion), Text(String), Resize(u32, u32), Focus(bool), Cursor(bool), }
Models input events.
Variants
Press(Button)
Pressed a button.
Release(Button)
Released a button.
Move(Motion)
Moved mouse cursor.
Text(String)
Text (usually from keyboard).
Resize(u32, u32)
Window got resized.
Focus(bool)
Window gained or lost focus.
Cursor(bool)
Window gained or lost cursor.
Trait Implementations
impl TextEvent for Input
[src]
fn from_text(text: &str, _old_event: &Input) -> Option<Input>
[src]
Creates a text event.
fn text<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&str) -> U,
[src]
F: FnMut(&str) -> U,
Calls closure if this is a text event.
fn text_args(&self) -> Option<String>
[src]
Returns text arguments.
impl MouseCursorEvent for Input
[src]
fn from_xy(x: f64, y: f64, _old_event: &Input) -> Option<Input>
[src]
Creates a mouse cursor event.
fn mouse_cursor<U, F>(&self, f: F) -> Option<U> where
F: FnMut(f64, f64) -> U,
[src]
F: FnMut(f64, f64) -> U,
Calls closure if this is a mouse cursor event.
fn mouse_cursor_args(&self) -> Option<[f64; 2]>
[src]
Returns mouse cursor arguments.
impl AfterRenderEvent for Input
[src]
fn from_after_render_args(
_args: &AfterRenderArgs,
_old_event: &Input
) -> Option<Input>
[src]
_args: &AfterRenderArgs,
_old_event: &Input
) -> Option<Input>
Creates an after render event.
fn after_render<U, F>(&self, _f: F) -> Option<U> where
F: FnMut(&AfterRenderArgs) -> U,
[src]
F: FnMut(&AfterRenderArgs) -> U,
Calls closure if this is an after render event.
fn after_render_args(&self) -> Option<AfterRenderArgs>
[src]
Returns after render arguments.
impl ControllerAxisEvent for Input
[src]
fn from_controller_axis_args(
args: ControllerAxisArgs,
_old_event: &Input
) -> Option<Input>
[src]
args: ControllerAxisArgs,
_old_event: &Input
) -> Option<Input>
Creates a controller axis event.
fn controller_axis<U, F>(&self, f: F) -> Option<U> where
F: FnMut(ControllerAxisArgs) -> U,
[src]
F: FnMut(ControllerAxisArgs) -> U,
Calls closure if this is a controller axis event.
fn controller_axis_args(&self) -> Option<ControllerAxisArgs>
[src]
Returns controller axis arguments.
impl ReleaseEvent for Input
[src]
[src]
Creates a release event.
fn release<U, F>(&self, f: F) -> Option<U> where
F: FnMut(Button) -> U,
[src]
F: FnMut(Button) -> U,
Calls closure if this is a release event.
fn release_args(&self) -> Option<Button>
[src]
Returns release arguments.
impl ResizeEvent for Input
[src]
fn from_width_height(w: u32, h: u32, _old_event: &Input) -> Option<Input>
[src]
Creates a resize event.
fn resize<U, F>(&self, f: F) -> Option<U> where
F: FnMut(u32, u32) -> U,
[src]
F: FnMut(u32, u32) -> U,
Calls closure if this is a resize event.
fn resize_args(&self) -> Option<[u32; 2]>
[src]
Returns resize arguments.
impl MouseScrollEvent for Input
[src]
fn from_xy(x: f64, y: f64, _old_event: &Input) -> Option<Input>
[src]
Creates a mouse scroll event.
fn mouse_scroll<U, F>(&self, f: F) -> Option<U> where
F: FnMut(f64, f64) -> U,
[src]
F: FnMut(f64, f64) -> U,
Calls a closure if this is a mouse scroll event.
fn mouse_scroll_args(&self) -> Option<[f64; 2]>
[src]
Returns mouse scroll arguments.
impl From<Motion> for Input
[src]
impl From<Input> for Event<Input>
[src]
impl GenericEvent for Input
[src]
fn event_id(&self) -> EventId
[src]
The id of this event.
fn with_args<F, U>(&'a self, f: F) -> U where
F: FnMut(&(Any + 'static)) -> U,
[src]
F: FnMut(&(Any + 'static)) -> U,
Calls closure with arguments
fn from_args(
event_id: EventId,
any: &(Any + 'static),
_old_event: &Input
) -> Option<Input>
[src]
event_id: EventId,
any: &(Any + 'static),
_old_event: &Input
) -> Option<Input>
Converts from arguments to Self
. Read more
impl CursorEvent for Input
[src]
fn from_cursor(cursor: bool, _old_event: &Input) -> Option<Input>
[src]
Creates a cursor event.
fn cursor<U, F>(&self, f: F) -> Option<U> where
F: FnMut(bool) -> U,
[src]
F: FnMut(bool) -> U,
Calls closure if this is a cursor event.
fn cursor_args(&self) -> Option<bool>
[src]
Returns cursor arguments.
impl UpdateEvent for Input
[src]
fn from_update_args(_args: &UpdateArgs, _old_event: &Input) -> Option<Input>
[src]
Creates an update event.
fn update<U, F>(&self, _f: F) -> Option<U> where
F: FnMut(&UpdateArgs) -> U,
[src]
F: FnMut(&UpdateArgs) -> U,
Calls closure if this is an update event.
fn from_dt(dt: f64, old_event: &Self) -> Option<Self>
[src]
Creates an update event with delta time.
fn update_args(&self) -> Option<UpdateArgs>
[src]
Returns update arguments.
impl PressEvent for Input
[src]
[src]
Creates a press event.
fn press<U, F>(&self, f: F) -> Option<U> where
F: FnMut(Button) -> U,
[src]
F: FnMut(Button) -> U,
Calls closure if this is a press event.
fn press_args(&self) -> Option<Button>
[src]
Returns press arguments.
impl PartialEq<Input> for Input
[src]
fn eq(&self, __arg_0: &Input) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Input) -> bool
[src]
This method tests for !=
.
impl TouchEvent for Input
[src]
fn from_touch_args(args: &TouchArgs, _old_event: &Input) -> Option<Input>
[src]
Creates a touch event.
fn touch<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&TouchArgs) -> U,
[src]
F: FnMut(&TouchArgs) -> U,
Calls closure if this is a touch event.
fn touch_args(&self) -> Option<TouchArgs>
[src]
Returns touch arguments.
impl MouseRelativeEvent for Input
[src]
fn from_xy(x: f64, y: f64, _old_event: &Input) -> Option<Input>
[src]
Creates a mouse relative event.
fn mouse_relative<U, F>(&self, f: F) -> Option<U> where
F: FnMut(f64, f64) -> U,
[src]
F: FnMut(f64, f64) -> U,
Calls closure if this is a mouse relative event.
fn mouse_relative_args(&self) -> Option<[f64; 2]>
[src]
Returns mouse relative arguments.
impl FocusEvent for Input
[src]
fn from_focused(focused: bool, _old_event: &Input) -> Option<Input>
[src]
Creates a focus event.
fn focus<U, F>(&self, f: F) -> Option<U> where
F: FnMut(bool) -> U,
[src]
F: FnMut(bool) -> U,
Calls closure if this is a focus event.
fn focus_args(&self) -> Option<bool>
[src]
Returns focus arguments.
impl Debug for Input
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Clone for Input
[src]
fn clone(&self) -> Input
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl IdleEvent for Input
[src]
fn from_idle_args(_args: &IdleArgs, _old_event: &Input) -> Option<Input>
[src]
Creates an idle event.
fn idle<U, F>(&self, _f: F) -> Option<U> where
F: FnMut(&IdleArgs) -> U,
[src]
F: FnMut(&IdleArgs) -> U,
Calls closure if this is an idle event.
fn from_dt(dt: f64, old_event: &Self) -> Option<Self>
[src]
Creates an update event with delta time.
fn idle_args(&self) -> Option<IdleArgs>
[src]
Returns idle arguments.
impl Encodable for Input
[src]
fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), <__S as Encoder>::Error> where
__S: Encoder,
[src]
__S: Encoder,
Serialize a value using an Encoder
.
impl Decodable for Input
[src]
fn decode<__D>(__arg_0: &mut __D) -> Result<Input, <__D as Decoder>::Error> where
__D: Decoder,
[src]
__D: Decoder,
Deserialize a value using a Decoder
.
impl RenderEvent for Input
[src]
fn from_render_args(_args: &RenderArgs, _old_event: &Input) -> Option<Input>
[src]
Creates a render event.
fn render<U, F>(&self, _f: F) -> Option<U> where
F: FnMut(&RenderArgs) -> U,
[src]
F: FnMut(&RenderArgs) -> U,
Calls closure if this is a render event.
fn render_args(&self) -> Option<RenderArgs>
[src]
Returns render arguments.