Struct let_engine::window::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: Vec2) -> Self
pub fn inner_size(self, size: Vec2) -> Self
Sets the inner size of the window in pixels.
sourcepub fn max_inner_size(self, size: Vec2) -> Self
pub fn max_inner_size(self, size: Vec2) -> Self
Restricts the inner size of the window to not go past the given size in pixels.
sourcepub fn min_inner_size(self, size: Vec2) -> Self
pub fn min_inner_size(self, size: Vec2) -> Self
Restricts the inner size of the window to not go below the given size in pixels.
sourcepub fn position(self, position: Vec2) -> Self
pub fn position(self, position: Vec2) -> Self
Moves the window to the given position in pixels.
Works on windows, mac and x11 but not on others.
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: impl Into<Color>) -> Self
pub fn clear_color(self, color: impl Into<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: Vec2) -> Self
pub fn resize_increments(self, increments: Vec2) -> Self
Build window with resize increments hint in pixels.
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 Debug for WindowBuilder
impl Debug for WindowBuilder
source§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
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
§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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
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>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.