Trait event::ResizeEvent [−] [src]

pub trait ResizeEvent {
    fn from_width_height(w: u32, h: u32, old_event: &Self) -> Option<Self>;
    fn resize<U, F>(&self, f: F) -> Option<U> where F: FnMut(u32, u32) -> U;

    fn resize_args(&self) -> Option<[u32; 2]> { ... }
}

When the window is resized

Required Methods

fn from_width_height(w: u32, h: u32, old_event: &Self) -> Option<Self>

Creates a resize event.

fn resize<U, F>(&self, f: F) -> Option<U> where F: FnMut(u32, u32) -> U

Calls closure if this is a resize event.

Provided Methods

fn resize_args(&self) -> Option<[u32; 2]>

Returns resize arguments.

Implementors