pub enum BackgroundPattern {
None,
Solid,
Dots,
Lines,
DiagonalForward,
CrossStitch,
}Expand description
A fill pattern for the background of a regular top-level window.
Patterns are 1-bit and snapped to a small physical-pixel grid so they stay
crisp at any DPI — retro desktop texture, not anti-aliased wallpaper. The
foreground (the dots / lines) is drawn in one of the named PATTERN_COLORS;
the gaps stay the window’s base background color.
Variants§
None
Plain background — no texture.
Solid
Flood the whole window with the pattern color.
Dots
A staggered field of dots (every other row offset half a step), like the classic Mac desktop.
Lines
Horizontal hairlines every 4px.
DiagonalForward
Forward diagonal hatching (///).
CrossStitch
Two crossing diagonals — a cross-stitch / XXXX weave.
Implementations§
Source§impl BackgroundPattern
impl BackgroundPattern
Sourcepub const ALL: [BackgroundPattern; 6]
pub const ALL: [BackgroundPattern; 6]
Every pattern, in the order the patterns demo rotates through them.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Canonical lower-case name — both the display label and the token
accepted by SAUDADE_WINDOW_PATTERN.
Sourcepub fn from_name(s: &str) -> Option<Self>
pub fn from_name(s: &str) -> Option<Self>
Parse a name token (case-insensitive, _ treated as
-). Returns None for anything unrecognized.
Sourcepub fn next(self) -> Self
pub fn next(self) -> Self
The next pattern in BackgroundPattern::ALL, wrapping at the end.
Trait Implementations§
Source§impl Clone for BackgroundPattern
impl Clone for BackgroundPattern
Source§fn clone(&self) -> BackgroundPattern
fn clone(&self) -> BackgroundPattern
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackgroundPattern
impl Debug for BackgroundPattern
Source§impl PartialEq for BackgroundPattern
impl PartialEq for BackgroundPattern
Source§fn eq(&self, other: &BackgroundPattern) -> bool
fn eq(&self, other: &BackgroundPattern) -> bool
self and other values to be equal, and is used by ==.impl Copy for BackgroundPattern
impl Eq for BackgroundPattern
impl StructuralPartialEq for BackgroundPattern
Auto Trait Implementations§
impl Freeze for BackgroundPattern
impl RefUnwindSafe for BackgroundPattern
impl Send for BackgroundPattern
impl Sync for BackgroundPattern
impl Unpin for BackgroundPattern
impl UnsafeUnpin for BackgroundPattern
impl UnwindSafe for BackgroundPattern
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
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§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.