pub enum DecorationsMode {
Native,
CustomChrome,
None,
}Expand description
How a window’s chrome is drawn.
Three-valued and explicit. Replaces the older custom_chrome: bool
flag on WindowConfig, which could not represent the
“borderless / no host” case.
Variants§
Native
OS-provided title bar, borders, and resize handles. The default for application windows on every platform.
CustomChrome
No native title bar; a
PlatformTitleBarHost is
constructed and attached to the tree so the app can paint its
own chrome. Falls back to Native on window systems that do
not support custom chrome — on X11 that means a window manager without
_NET_WM_MOVERESIZE, since a borderless window would otherwise be
impossible to move or resize.
None
No decorations at all — neither OS chrome nor a host. Use for splash screens, borderless popups, or fully chrome-less embeds.
Implementations§
Source§impl DecorationsMode
impl DecorationsMode
Sourcepub fn wants_custom_chrome_host(self) -> bool
pub fn wants_custom_chrome_host(self) -> bool
Returns true when this mode wants a
PlatformTitleBarHost to be
constructed during window creation.
Sourcepub fn wants_native_decorations(self) -> bool
pub fn wants_native_decorations(self) -> bool
Returns true when the OS should draw its own chrome.
Trait Implementations§
Source§impl Clone for DecorationsMode
impl Clone for DecorationsMode
Source§fn clone(&self) -> DecorationsMode
fn clone(&self) -> DecorationsMode
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 DecorationsMode
Source§impl Debug for DecorationsMode
impl Debug for DecorationsMode
Source§impl Default for DecorationsMode
impl Default for DecorationsMode
Source§fn default() -> DecorationsMode
fn default() -> DecorationsMode
impl Eq for DecorationsMode
Source§impl PartialEq for DecorationsMode
impl PartialEq for DecorationsMode
impl StructuralPartialEq for DecorationsMode
Auto Trait Implementations§
impl Freeze for DecorationsMode
impl RefUnwindSafe for DecorationsMode
impl Send for DecorationsMode
impl Sync for DecorationsMode
impl Unpin for DecorationsMode
impl UnsafeUnpin for DecorationsMode
impl UnwindSafe for DecorationsMode
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
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more