pub enum WindowKind {
Normal,
Popup,
}Expand description
What kind of OS surface a declared window is.
Variants§
Normal
A regular top-level window with the launcher’s chrome.
Popup
A menu surface: borderless, absent from the taskbar, owned by the
window that declared it and closed when that window closes, placed
in screen coordinates against WindowConfig::anchor rather than
clamped into a viewport, and non-activating by default — it
must not take OS focus, or opening a combobox would blur the field
that opened it. While a non-activating popup is up the driver
routes its owner’s keyboard input to it and the owner’s
env.focused stays true, so the field still draws focused while
the arrow keys walk the list.
Reach for it only for the placements a float cannot make: a list
taller than the window, a menu near an edge with nowhere in-window
to go, a panel beside the app. Everything else is cheaper as a
float (crate::spec::FloatConfig::fit): a float costs one tree
and one draw call, a popup an OS surface, a swapchain and a Core.
Implementations§
Source§impl WindowKind
impl WindowKind
Sourcepub const ALL: [WindowKind; 2]
pub const ALL: [WindowKind; 2]
Every kind, in wire order: the index a binding that spells kinds as numbers sends. Append-only.
Sourcepub fn from_name(name: &str) -> Option<WindowKind>
pub fn from_name(name: &str) -> Option<WindowKind>
The kind a wire name spells: the inverse of Self::name.
Trait Implementations§
Source§impl Clone for WindowKind
impl Clone for WindowKind
Source§fn clone(&self) -> WindowKind
fn clone(&self) -> WindowKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WindowKind
Source§impl Debug for WindowKind
impl Debug for WindowKind
Source§impl Default for WindowKind
impl Default for WindowKind
Source§fn default() -> WindowKind
fn default() -> WindowKind
impl Eq for WindowKind
Source§impl PartialEq for WindowKind
impl PartialEq for WindowKind
impl StructuralPartialEq for WindowKind
Auto Trait Implementations§
impl Freeze for WindowKind
impl RefUnwindSafe for WindowKind
impl Send for WindowKind
impl Sync for WindowKind
impl Unpin for WindowKind
impl UnsafeUnpin for WindowKind
impl UnwindSafe for WindowKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.