pub struct WindowBuilder {
pub window: WindowAttributes,
/* private fields */
}
Expand description
Object that allows you to build windows.
Fields§
§window: WindowAttributes
The attributes to use to create the window.
Implementations§
Source§impl WindowBuilder
impl WindowBuilder
Sourcepub fn new() -> WindowBuilder
pub fn new() -> WindowBuilder
Initializes a new WindowBuilder
with default values.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn with_title<T>(self, title: T) -> WindowBuilder
pub fn with_title<T>(self, title: T) -> WindowBuilder
Requests a specific title for the window.
Sourcepub 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
Sourcepub fn with_maximized(self, maximized: bool) -> WindowBuilder
pub fn with_maximized(self, maximized: bool) -> WindowBuilder
Requests maximized mode.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn with_multitouch(self) -> WindowBuilder
pub fn with_multitouch(self) -> WindowBuilder
Enables multitouch.
Sourcepub 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§
Source§impl Clone for WindowBuilder
impl Clone for WindowBuilder
Source§fn clone(&self) -> WindowBuilder
fn clone(&self) -> WindowBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl WindowBuilderExt for WindowBuilder
impl WindowBuilderExt for WindowBuilder
fn with_x11_visual<T>(self, visual_infos: *const T) -> WindowBuilder
fn with_x11_screen(self, screen_id: i32) -> WindowBuilder
Auto Trait Implementations§
impl Freeze for WindowBuilder
impl RefUnwindSafe for WindowBuilder
impl !Send for WindowBuilder
impl !Sync for WindowBuilder
impl Unpin for WindowBuilder
impl UnwindSafe for WindowBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.