pub struct TooltipState { /* private fields */ }Expand description
Retained visibility for a tooltip attached to an existing button focus handle.
Keyboard focus reveals the description immediately; pointer hover waits 500 ms. Leaving the trigger cancels a pending hover. Blur, activation, and Escape dismiss the tooltip without moving focus. Escape suppresses reopening until another focus or pointer entry.
Keep the matching Tooltip mounted with its trigger. Its text and visual
styles belong to the application; this state does not own a second focus stop.
Implementations§
Source§impl TooltipState
impl TooltipState
pub fn new( focus: &FocusHandle, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn is_open(&self) -> bool
Sourcepub fn focus_handle(&self) -> &FocusHandle
pub fn focus_handle(&self) -> &FocusHandle
The same focus handle used by the application and underlying Button.
Auto Trait Implementations§
impl !RefUnwindSafe for TooltipState
impl !Send for TooltipState
impl !Sync for TooltipState
impl !UnwindSafe for TooltipState
impl Forget for TooltipState
impl Freeze for TooltipStatewhere
NonZero<u32>: Freeze,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: Freeze,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: Freeze,
*const () is !null: Freeze,
PhantomData<((), RunnableMeta)>: Freeze,
*const Task<Box<dyn Any + Sync + Send>> is !null: Freeze,
PhantomData<Task<Box<dyn Any + Sync + Send>>>: Freeze,
PhantomData<fn()>: Freeze,
*const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Subscription>: Freeze,
impl Move for TooltipState
impl Unpin for TooltipState
impl UnsafeUnpin for TooltipStatewhere
NonZeroU32Inner: UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<((), RunnableMeta)>: UnsafeUnpin,
*const Task<Box<dyn Any + Sync + Send>> is !null: UnsafeUnpin,
PhantomData<Task<Box<dyn Any + Sync + Send>>>: UnsafeUnpin,
PhantomData<fn()>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, RendezvousState<()>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<RawMutex, RendezvousState<()>>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Subscription>: UnsafeUnpin,
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
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> ⓘ
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