Trait piston::ResizeEvent [−][src]
pub trait ResizeEvent { pub fn from_resize_args(args: &ResizeArgs, old_event: &Self) -> Option<Self>; pub fn resize<U, F>(&self, f: F) -> Option<U>
where
F: FnMut(&ResizeArgs) -> U; pub fn resize_args(&self) -> Option<ResizeArgs> { ... } }
When the window is resized.
Required methods
pub fn from_resize_args(args: &ResizeArgs, old_event: &Self) -> Option<Self>
[src]
Creates a resize event.
Preserves time stamp from original input event, if any.
pub fn resize<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&ResizeArgs) -> U,
[src]
F: FnMut(&ResizeArgs) -> U,
Calls closure if this is a resize event.
Provided methods
pub fn resize_args(&self) -> Option<ResizeArgs>
[src]
Returns resize arguments.
Implementors
impl ResizeEvent for Event
[src]
pub fn from_resize_args(args: &ResizeArgs, old_event: &Event) -> Option<Event>
[src]
pub fn resize<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&ResizeArgs) -> U,
[src]
F: FnMut(&ResizeArgs) -> U,