[−][src]Struct riddle_platform_winit::WindowBuilder
Builder for Window
instances.
Default values:
- Width:
800
- Height:
600
- Title:
Riddle Window
- Resizeable:
true
- Cursor Visible:
true
Example
use riddle::{*, platform::*}; fn main() -> Result<(), RiddleError> { let rdl = RiddleLib::new()?; let window: WindowHandle = WindowBuilder::new() .title("A Sample Title") .dimensions(320, 240) .build(rdl.context())?; // The window has been created, and is visible now. // [.. the rest of the application ..] }
Implementations
impl WindowBuilder
[src]
pub fn new() -> Self
[src]
pub fn dimensions(&mut self, width: u32, height: u32) -> &mut Self
[src]
Set the dimensions of the window, in logical units.
The pixel dimensions of the window may be different if the display's scale factor
does not equal 1
.
pub fn resizeable(&mut self, resizeable: bool) -> &mut Self
[src]
Set whether the window is resizeable.
pub fn title<S: Into<String>>(&mut self, title: S) -> &mut Self
[src]
Set the window's title.
pub fn cursor_visible(&mut self, cursor_visible: bool) -> &mut Self
[src]
Set whether the system cursor will be displayed for the created window.
pub fn build<'a, C>(&self, ctx: C) -> Result<WindowHandle, PlatformError> where
C: Borrow<PlatformContext<'a>>,
[src]
C: Borrow<PlatformContext<'a>>,
Build the new window, returning a handle to the new window.
The window will be visible as long as the handle, or a clone of it, is alive.
Trait Implementations
impl Default for WindowBuilder
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,