pub struct WindowRequest {
pub config: WindowConfig,
pub modality: Modality,
/* private fields */
}Expand description
A window the application wants opened, and the application that will run in it.
Handed back from DeniseApp::take_windows. The builder is called once, at
the moment the window’s surface exists, and is given its size in physical
pixels and its display’s scale factor — the same contract run_with makes
for the main window, and for the same reason: a form built without them is
laid out for a display it may not be opening on.
Fields§
§config: WindowConfigTitle, size, resizability and frame cadence for the new window.
modality: ModalityHow it relates to the window that asked for it.
Implementations§
Source§impl WindowRequest
impl WindowRequest
Sourcepub fn new<A, B>(config: WindowConfig, build: B) -> Self
pub fn new<A, B>(config: WindowConfig, build: B) -> Self
A window of config, whose application is built once its surface exists.
Modality::Owned unless with_modality
says otherwise.
Sourcepub fn ready<A: DeniseApp + 'static>(config: WindowConfig, app: A) -> Self
pub fn ready<A: DeniseApp + 'static>(config: WindowConfig, app: A) -> Self
A window whose application is already built.
Convenient, and wrong on a HiDPI display unless the tree inside it does not
care about scale: the application cannot have been told the scale factor,
because the window it will open on does not exist yet.
new is the one to reach for.
Sourcepub fn with_modality(self, modality: Modality) -> Self
pub fn with_modality(self, modality: Modality) -> Self
Sets how this window relates to the one opening it.
Auto Trait Implementations§
impl !RefUnwindSafe for WindowRequest
impl !Send for WindowRequest
impl !Sync for WindowRequest
impl !UnwindSafe for WindowRequest
impl Freeze for WindowRequest
impl Unpin for WindowRequest
impl UnsafeUnpin for WindowRequest
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.