pub struct WindowBuilder { /* private fields */ }Implementations§
Source§impl WindowBuilder
impl WindowBuilder
pub fn new() -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn icon(self, icon: WindowIcon) -> Self
pub fn icon_svg(self, svg: impl Into<Vec<u8>>) -> Self
pub fn without_icon(self) -> Self
Sourcepub fn initial_size(self, size: Size) -> Self
pub fn initial_size(self, size: Size) -> Self
Request an initial logical client size for the native window.
Sourcepub fn initial_position(self, position: Point) -> Self
pub fn initial_position(self, position: Point) -> Self
Request an initial physical desktop position for the native window.
Desktop hosts may adjust or ignore an unsafe position after monitor topology changes.
pub fn root<W>(self, root: W) -> Selfwhere
W: Widget + 'static,
Sourcepub fn controller(self, controller: impl CommandController + 'static) -> Self
pub fn controller(self, controller: impl CommandController + 'static) -> Self
Attach a non-widget controller whose lifetime is exactly this window’s lifetime.
Sourcepub fn on_command<T, F>(self, key: CommandKey<T>, handler: F) -> Self
pub fn on_command<T, F>(self, key: CommandKey<T>, handler: F) -> Self
Subscribe a window-scoped handler to a typed command.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WindowBuilder
impl !RefUnwindSafe for WindowBuilder
impl !Send for WindowBuilder
impl !Sync for WindowBuilder
impl !UnwindSafe for WindowBuilder
impl Unpin for WindowBuilder
impl UnsafeUnpin 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