Struct nannou::WindowBuilder
[−]
pub struct WindowBuilder { pub window: WindowAttributes, // some fields omitted }
Object that allows you to build windows.
Fields
window: WindowAttributes
The attributes to use to create the window.
Methods
impl WindowBuilder
fn new() -> WindowBuilder
Initializes a new WindowBuilder
with default values.
fn with_dimensions(self, width: u32, height: u32) -> WindowBuilder
Requests the window to be of specific dimensions.
Width and height are in pixels.
fn with_min_dimensions(self, width: u32, height: u32) -> WindowBuilder
Sets a minimum dimension size for the window
Width and height are in pixels.
fn with_max_dimensions(self, width: u32, height: u32) -> WindowBuilder
Sets a maximum dimension size for the window
Width and height are in pixels.
fn with_title<T>(self, title: T) -> WindowBuilder where
T: Into<String>,
T: Into<String>,
Requests a specific title for the window.
fn with_fullscreen(self, monitor: Option<MonitorId>) -> WindowBuilder
Sets the window fullscreen state. None means a normal window, Some(MonitorId) means a fullscreen window on that specific monitor
fn with_maximized(self, maximized: bool) -> WindowBuilder
Requests maximized mode.
fn with_visibility(self, visible: bool) -> WindowBuilder
Sets whether the window will be initially hidden or visible.
fn with_transparency(self, transparent: bool) -> WindowBuilder
Sets whether the background of the window should be transparent.
fn with_decorations(self, decorations: bool) -> WindowBuilder
Sets whether the window should have a border, a title bar, etc.
fn with_multitouch(self) -> WindowBuilder
Enables multitouch.
fn build(self, events_loop: &EventsLoop) -> Result<Window, CreationError>
Builds the window.
Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.
Trait Implementations
impl Clone for WindowBuilder
fn clone(&self) -> WindowBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl WindowBuilderExt for WindowBuilder
fn with_parent_window(self, parent: *mut HWND__) -> WindowBuilder
Sets a parent to the window to be created.