pub struct TooltipWidget<W> { /* private fields */ }Trait Implementations§
Source§impl<W: Widget> Widget for TooltipWidget<W>
impl<W: Widget> Widget for TooltipWidget<W>
fn ui(self, ui: &mut Ui<'_>) -> Response
Source§fn tooltip(self, text: impl Into<String>) -> TooltipWidget<Self>where
Self: Sized,
fn tooltip(self, text: impl Into<String>) -> TooltipWidget<Self>where
Self: Sized,
Show a tooltip while the widget is hovered, in the same expression:
ui.add(Button::new("Save").tooltip("Write the file")).Open a context menu on secondary click. The chosen item is reported by
Response::menu_selected on the pass it is picked.Source§fn accessible_label(self, label: impl Into<String>) -> Accessible<Self>where
Self: Sized,
fn accessible_label(self, label: impl Into<String>) -> Accessible<Self>where
Self: Sized,
The name a screen reader speaks for this widget, replacing the one it derives from
its visible text. Required for controls without text: an icon button, a bare
switch, a slider without a caption.
Source§fn accessible_description(
self,
description: impl Into<String>,
) -> Accessible<Self>where
Self: Sized,
fn accessible_description(
self,
description: impl Into<String>,
) -> Accessible<Self>where
Self: Sized,
Extra detail a screen reader speaks after the name: a hint or the reason for an error.
Source§fn accessible_role(self, role: AccessRole) -> Accessible<Self>where
Self: Sized,
fn accessible_role(self, role: AccessRole) -> Accessible<Self>where
Self: Sized,
Present this widget to assistive technology as
role. A custom widget that does
not describe itself becomes a node of this role with the response’s bounds.Leave this widget and everything in it out of the accessibility tree: decoration
that says nothing a screen reader user needs.
Auto Trait Implementations§
impl<W> Freeze for TooltipWidget<W>where
W: Freeze,
impl<W> RefUnwindSafe for TooltipWidget<W>where
W: RefUnwindSafe,
impl<W> Send for TooltipWidget<W>where
W: Send,
impl<W> Sync for TooltipWidget<W>where
W: Sync,
impl<W> Unpin for TooltipWidget<W>where
W: Unpin,
impl<W> UnsafeUnpin for TooltipWidget<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for TooltipWidget<W>where
W: UnwindSafe,
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> 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.