pub struct TooltipDefaults { /* private fields */ }Expand description
Application-wide timing for tooltips shown through TooltipOverlay.
Read on every show and hide request, so installing new defaults takes effect in windows that are already open.
Implementations§
Source§impl TooltipDefaults
impl TooltipDefaults
Sourcepub fn new() -> TooltipDefaults
pub fn new() -> TooltipDefaults
Creates the Base defaults: a 500 ms show delay and a 300 ms grace period.
Sourcepub fn with_show_delay(self, delay: Duration) -> TooltipDefaults
pub fn with_show_delay(self, delay: Duration) -> TooltipDefaults
Sets how long the pointer must rest on a trigger before its tooltip shows.
Sourcepub fn with_grace_period(self, period: Duration) -> TooltipDefaults
pub fn with_grace_period(self, period: Duration) -> TooltipDefaults
Sets how long a tooltip stays after the pointer leaves its trigger.
Entering another trigger within this period switches to its tooltip without waiting for the show delay.
Sourcepub fn show_delay(&self) -> Duration
pub fn show_delay(&self) -> Duration
How long the pointer must rest on a trigger before its tooltip shows.
Sourcepub fn grace_period(&self) -> Duration
pub fn grace_period(&self) -> Duration
How long a tooltip stays after the pointer leaves its trigger.
Sourcepub fn global(cx: &App) -> TooltipDefaults
pub fn global(cx: &App) -> TooltipDefaults
Returns the installed defaults, or the Base ones when none were.
Trait Implementations§
Source§impl Clone for TooltipDefaults
impl Clone for TooltipDefaults
Source§fn clone(&self) -> TooltipDefaults
fn clone(&self) -> TooltipDefaults
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 moreimpl Copy for TooltipDefaults
Source§impl Debug for TooltipDefaults
impl Debug for TooltipDefaults
Source§impl Default for TooltipDefaults
impl Default for TooltipDefaults
Source§fn default() -> TooltipDefaults
fn default() -> TooltipDefaults
Returns the “default value” for a type. Read more
impl Eq for TooltipDefaults
impl Global for TooltipDefaults
Source§impl PartialEq for TooltipDefaults
impl PartialEq for TooltipDefaults
impl StructuralPartialEq for TooltipDefaults
Auto Trait Implementations§
impl Freeze for TooltipDefaults
impl RefUnwindSafe for TooltipDefaults
impl Send for TooltipDefaults
impl Sync for TooltipDefaults
impl Unpin for TooltipDefaults
impl UnsafeUnpin for TooltipDefaults
impl UnwindSafe for TooltipDefaults
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<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
Compare self to
key and return true if they are equal.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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<T> UpdateGlobal for Twhere
T: Global,
impl<T> UpdateGlobal for Twhere
T: Global,
Source§fn update_global<C, F, R>(cx: &mut C, update: F) -> R
fn update_global<C, F, R>(cx: &mut C, update: F) -> R
Updates the global instance of the implementing type using the provided closure. Read more
Source§fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
Set the global instance of the implementing type.