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
impl WindowBuilder
pub fn new() -> WindowBuilder
pub fn new() -> WindowBuilder
Initializes a new WindowBuilder
with default values.
pub fn with_dimensions(self, width: u32, height: u32) -> WindowBuilder
pub fn with_dimensions(self, width: u32, height: u32) -> WindowBuilder
Requests the window to be of specific dimensions.
Width and height are in pixels.
pub fn with_min_dimensions(self, width: u32, height: u32) -> WindowBuilder
pub fn with_min_dimensions(self, width: u32, height: u32) -> WindowBuilder
Sets a minimum dimension size for the window
Width and height are in pixels.
pub fn with_max_dimensions(self, width: u32, height: u32) -> WindowBuilder
pub fn with_max_dimensions(self, width: u32, height: u32) -> WindowBuilder
Sets a maximum dimension size for the window
Width and height are in pixels.
pub fn with_title<T>(self, title: T) -> WindowBuilder where
T: Into<String>,
pub fn with_title<T>(self, title: T) -> WindowBuilder where
T: Into<String>,
Requests a specific title for the window.
pub fn with_fullscreen(self, monitor: Option<MonitorId>) -> WindowBuilder
pub 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
pub fn with_maximized(self, maximized: bool) -> WindowBuilder
pub fn with_maximized(self, maximized: bool) -> WindowBuilder
Requests maximized mode.
pub fn with_visibility(self, visible: bool) -> WindowBuilder
pub fn with_visibility(self, visible: bool) -> WindowBuilder
Sets whether the window will be initially hidden or visible.
pub fn with_transparency(self, transparent: bool) -> WindowBuilder
pub fn with_transparency(self, transparent: bool) -> WindowBuilder
Sets whether the background of the window should be transparent.
pub fn with_decorations(self, decorations: bool) -> WindowBuilder
pub fn with_decorations(self, decorations: bool) -> WindowBuilder
Sets whether the window should have a border, a title bar, etc.
pub fn with_multitouch(self) -> WindowBuilder
pub fn with_multitouch(self) -> WindowBuilder
Enables multitouch.
pub fn build(self, events_loop: &EventsLoop) -> Result<Window, CreationError>
pub 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
impl Clone for WindowBuilder
fn clone(&self) -> WindowBuilder
fn clone(&self) -> WindowBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl WindowBuilderExt for WindowBuilder
impl WindowBuilderExt for WindowBuilder
fn with_x11_visual<T>(self, visual_infos: *const T) -> WindowBuilder
fn with_x11_visual<T>(self, visual_infos: *const T) -> WindowBuilder
fn with_x11_screen(self, screen_id: i32) -> WindowBuilder
fn with_x11_screen(self, screen_id: i32) -> WindowBuilder
Auto Trait Implementations
impl !Send for WindowBuilder
impl !Send for WindowBuilder
impl !Sync for WindowBuilder
impl !Sync for WindowBuilder