Struct let_engine::prelude::WindowBuilder
source · pub struct WindowBuilder { /* private fields */ }
Expand description
A builder describing the initial state of the window.
Implementations§
source§impl WindowBuilder
impl WindowBuilder
sourcepub fn from_winit_builder(builder: WindowBuilder) -> Self
pub fn from_winit_builder(builder: WindowBuilder) -> Self
Makes a new window builder using the one from the Winit crate.
sourcepub fn inner_size(self, size: impl Into<Size>) -> Self
pub fn inner_size(self, size: impl Into<Size>) -> Self
Sets the inner size of the window.
sourcepub fn max_inner_size(self, size: impl Into<Size>) -> Self
pub fn max_inner_size(self, size: impl Into<Size>) -> Self
Restricts the inner size of the window to not go past the given size.
sourcepub fn min_inner_size(self, size: impl Into<Size>) -> Self
pub fn min_inner_size(self, size: impl Into<Size>) -> Self
Restricts the inner size of the window to not go below the given size.
sourcepub fn position(self, position: impl Into<Position>) -> Self
pub fn position(self, position: impl Into<Position>) -> Self
Moves the window to the given position.
Works on windows, mac and x11 but not wayland.
Enables the given buttons on the title bar.
sourcepub fn title(self, title: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
Sets the title of the window seen on the title bar.
sourcepub fn fullscreen(self, fullscreen: bool) -> Self
pub fn fullscreen(self, fullscreen: bool) -> Self
Sets the window to borderless fullscreen on the current monitor.
sourcepub fn maximized(self, maximized: bool) -> Self
pub fn maximized(self, maximized: bool) -> Self
Request that the window is maximized upon creation.
sourcepub fn clear_color(self, color: Color) -> Self
pub fn clear_color(self, color: Color) -> Self
Sets the clear color of the window.
sourcepub fn decorations(self, decorations: bool) -> Self
pub fn decorations(self, decorations: bool) -> Self
Gives the window a title bar and buttons.
sourcepub fn window_level(self, level: WindowLevel) -> Self
pub fn window_level(self, level: WindowLevel) -> Self
The ordering of the window.
sourcepub fn resize_increments(self, increments: impl Into<Size>) -> Self
pub fn resize_increments(self, increments: impl Into<Size>) -> Self
Build window with resize increments hint.
Trait Implementations§
source§impl Clone for WindowBuilder
impl Clone for WindowBuilder
source§fn clone(&self) -> WindowBuilder
fn clone(&self) -> WindowBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for WindowBuilder
impl Default for WindowBuilder
source§impl From<WindowBuilder> for WindowBuilder
impl From<WindowBuilder> for WindowBuilder
source§fn from(val: WindowBuilder) -> Self
fn from(val: WindowBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.