Trait piston::CursorEvent [−][src]
pub trait CursorEvent {
pub fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>;
pub fn cursor<U, F>(&self, f: F) -> Option<U>
where
F: FnMut(bool) -> U;
pub fn cursor_args(&self) -> Option<bool> { ... }
}When window gets or loses cursor.
Required methods
pub fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>[src]
Creates a cursor event.
Preserves time stamp from original input event, if any.
pub 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.
Provided methods
pub fn cursor_args(&self) -> Option<bool>[src]
Returns cursor arguments.