pub struct OverlayManager(/* private fields */);Expand description
Counts open windows and paints a darkening overlay.
Cheap to clone (Arc). Stored on crate::theme::Theme::overlay_manager.
Implementations§
Source§impl OverlayManager
impl OverlayManager
Sourcepub fn paint_background(&self)
pub fn paint_background(&self)
Paint the next overlay on the background layer.
Sourcepub fn paint_middle(&self)
pub fn paint_middle(&self)
Paint the next overlay on the middle layer.
Sourcepub fn paint_foreground(&self)
pub fn paint_foreground(&self)
Paint the next overlay on the foreground layer.
Sourcepub fn paint_tooltip(&self)
pub fn paint_tooltip(&self)
Paint the next overlay on the tooltip layer.
Sourcepub fn paint_debug(&self)
pub fn paint_debug(&self)
Paint the next overlay on the debug layer.
Sourcepub fn window_opened(&self)
pub fn window_opened(&self)
Call this when you open a window
Sourcepub fn window_closed(&self)
pub fn window_closed(&self)
Call this when you close a window
Sourcepub fn recommended_order(&self) -> Order
pub fn recommended_order(&self) -> Order
Layer suggested by the current window count.
Sourcepub fn calculate_alpha(&self) -> u8
pub fn calculate_alpha(&self) -> u8
Alpha derived from the window count (0 if none are open).
Sourcepub fn overlay_tint(&self) -> Color32
pub fn overlay_tint(&self) -> Color32
Returns the tint color based on the counter
Sourcepub fn paint_overlay(&self, ctx: &Context, recommend_order: bool)
pub fn paint_overlay(&self, ctx: &Context, recommend_order: bool)
Paints a full-screen darkening overlay up to Foreground layer if needed
If recommend_order is true, it will choose an order based on the counter
Trait Implementations§
Source§impl Clone for OverlayManager
impl Clone for OverlayManager
Source§fn clone(&self) -> OverlayManager
fn clone(&self) -> OverlayManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OverlayManager
impl Debug for OverlayManager
Source§impl Default for OverlayManager
impl Default for OverlayManager
Source§fn default() -> OverlayManager
fn default() -> OverlayManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OverlayManager
impl RefUnwindSafe for OverlayManager
impl Send for OverlayManager
impl Sync for OverlayManager
impl Unpin for OverlayManager
impl UnsafeUnpin for OverlayManager
impl UnwindSafe for OverlayManager
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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