pub struct Tooltip { /* private fields */ }Expand description
A lazily displayed, pointer-passive GPU overlay attached to an element.
The content is an ordinary QuickGUI element tree. It is laid out only when its trigger survives the hover delay, then retained until the tooltip hides or the application view changes.
Implementations§
Source§impl Tooltip
impl Tooltip
Sourcepub fn new(content: impl IntoElement) -> Self
pub fn new(content: impl IntoElement) -> Self
Create a tooltip from an arbitrary GPU element tree.
pub fn placement(self, placement: AnchorPlacement) -> Self
pub fn delay(self, delay: Duration) -> Self
pub fn gap(self, gap: f32) -> Self
pub fn viewport_margin(self, margin: f32) -> Self
Sourcepub fn accessibility_description(self, description: impl Into<Arc<str>>) -> Self
pub fn accessibility_description(self, description: impl Into<Arc<str>>) -> Self
Text exposed as the trigger’s native accessibility description while the visual tooltip stays transient.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tooltip
impl !Send for Tooltip
impl !Sync for Tooltip
impl !UnwindSafe for Tooltip
impl Freeze for Tooltip
impl Unpin for Tooltip
impl UnsafeUnpin for Tooltip
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.