Trait window::AdvancedWindow [] [src]

pub trait AdvancedWindow: Window + Sized {
    fn get_title(&self) -> String;
    fn set_title(&mut self, value: String);
    fn get_exit_on_esc(&self) -> bool;
    fn set_exit_on_esc(&mut self, value: bool);
    fn set_capture_cursor(&mut self, value: bool);

    fn title(self, value: String) -> Self { ... }
    fn exit_on_esc(self, value: bool) -> Self { ... }
    fn capture_cursor(self, value: bool) -> Self { ... }
}

Implemented by fully supported window back-ends.

Required Methods

fn get_title(&self) -> String

Gets a copy of the title of the window.

fn set_title(&mut self, value: String)

Sets the title of the window.

fn get_exit_on_esc(&self) -> bool

Gets whether to exit when pressing esc.

fn set_exit_on_esc(&mut self, value: bool)

Sets whether to exit when pressing esc.

fn set_capture_cursor(&mut self, value: bool)

Sets whether to capture/grab cursor. This is used to lock and hide cursor to the window, for example in a first-person shooter game.

Provided Methods

fn title(self, value: String) -> Self

Sets title on window.

fn exit_on_esc(self, value: bool) -> Self

Sets whether to exit when pressing esc.

fn capture_cursor(self, value: bool) -> Self

Sets whether to capture/grab cursor (see set_capture_cursor).

Implementors