pub struct TooltipHover { /* private fields */ }Expand description
Hover state for one tooltip.
generation is bumped on every hover transition; a timer that fires after a
newer transition has been recorded is stale and must not flip the tip. That
is what keeps a fast pass over a row of triggers from opening all of them.
focus_dismissed is what Escape trips for a focus-opened tip. The focus
gate (contains_focused && focus_visible) is not something Escape may
clear — focus_visible is app-wide state every focus ring reads — so the
dismissal is remembered per tooltip instead, and dropped on either edge of
the focus session. A dismissal therefore lasts only for the current focus:
the next keyboard focus shows the tip again.
Implementations§
Source§impl TooltipHover
impl TooltipHover
Sourcepub fn closed() -> Self
pub fn closed() -> Self
A closed tip, for a caller that needs the same seed the component uses.
The state lives in Window::use_keyed_state under the tooltip’s id, and
a test (or any caller that wants to read the flag) has to hand that call
the identical initialiser or it seeds a different slot.
Sourcepub fn is_focus_open(&self) -> bool
pub fn is_focus_open(&self) -> bool
Whether keyboard-visible focus opened the tip in this focus session.
Auto Trait Implementations§
impl Freeze for TooltipHover
impl RefUnwindSafe for TooltipHover
impl Send for TooltipHover
impl Sync for TooltipHover
impl Unpin for TooltipHover
impl UnsafeUnpin for TooltipHover
impl UnwindSafe for TooltipHover
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
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