Struct kernel::graphics::window::Window
[−]
[src]
pub struct Window {
pub point: Point,
pub size: Size,
pub title: String,
pub content: Box<Display>,
pub title_color: Color,
pub border_color: Color,
pub focused: bool,
pub minimized: bool,
// some fields omitted
}A window
Fields
point | The position of the window |
size | The size of the window |
title | The title of the window |
content | The content of the window |
title_color | The color of the window title |
border_color | The color of the border |
focused | Is the window focused? |
minimized | Is the window minimized? |
Methods
impl Window
fn new(point: Point, size: Size, title: String) -> Box<Self>
Create a new window
fn poll(&mut self) -> Option<Event>
Poll the window (new)
fn redraw(&mut self)
Redraw the window
fn draw(&mut self, display: &Display)
Draw the window using a Display
fn on_key(&mut self, key_event: KeyEvent)
Called on key press
fn on_mouse(&mut self, orig_mouse_event: MouseEvent, allow_catch: bool) -> bool
Called on mouse movement