pub struct WindowOpenOptions {
pub title: String,
pub size: Size,
pub scale: WindowScalePolicy,
pub gl_config: Option<GlConfig>,
}Expand description
The options for opening a new window
Fields§
§title: String§size: SizeThe logical size of the window
These dimensions will be scaled by the scaling policy specified in scale. Mouse
position will be passed back as logical coordinates.
scale: WindowScalePolicyThe dpi scaling policy
gl_config: Option<GlConfig>If provided, then an OpenGL context will be created for this window. You’ll be able to access this context through crate::Window::gl_context.
By default, this is set to None.
Implementations§
Source§impl WindowOpenOptions
impl WindowOpenOptions
pub fn new() -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_size(self, width: f64, height: f64) -> Self
pub fn with_scale_policy(self, scale: WindowScalePolicy) -> Self
pub fn with_gl_config(self, gl_config: impl Into<Option<GlConfig>>) -> Self
Trait Implementations§
Source§impl Clone for WindowOpenOptions
impl Clone for WindowOpenOptions
Source§fn clone(&self) -> WindowOpenOptions
fn clone(&self) -> WindowOpenOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowOpenOptions
impl Debug for WindowOpenOptions
Source§impl Default for WindowOpenOptions
impl Default for WindowOpenOptions
Source§impl PartialEq for WindowOpenOptions
impl PartialEq for WindowOpenOptions
impl StructuralPartialEq for WindowOpenOptions
Auto Trait Implementations§
impl Freeze for WindowOpenOptions
impl RefUnwindSafe for WindowOpenOptions
impl Send for WindowOpenOptions
impl Sync for WindowOpenOptions
impl Unpin for WindowOpenOptions
impl UnsafeUnpin for WindowOpenOptions
impl UnwindSafe for WindowOpenOptions
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