pub struct Tooltip<'a> {
pub popup: Popup<'a>,
/* private fields */
}
Fields§
§popup: Popup<'a>
Implementations§
Source§impl Tooltip<'_>
impl Tooltip<'_>
Sourcepub fn new(
parent_widget: Id,
ctx: Context,
anchor: impl Into<PopupAnchor>,
parent_layer: LayerId,
) -> Self
👎Deprecated: Use Tooltip::always_open
instead.
pub fn new( parent_widget: Id, ctx: Context, anchor: impl Into<PopupAnchor>, parent_layer: LayerId, ) -> Self
Tooltip::always_open
instead.Show a tooltip that is always open.
Sourcepub fn always_open(
ctx: Context,
parent_layer: LayerId,
parent_widget: Id,
anchor: impl Into<PopupAnchor>,
) -> Self
pub fn always_open( ctx: Context, parent_layer: LayerId, parent_widget: Id, anchor: impl Into<PopupAnchor>, ) -> Self
Show a tooltip that is always open.
Sourcepub fn for_widget(response: &Response) -> Self
pub fn for_widget(response: &Response) -> Self
Show a tooltip for a widget. Always open (as long as this function is called).
Sourcepub fn for_enabled(response: &Response) -> Self
pub fn for_enabled(response: &Response) -> Self
Show a tooltip when hovering an enabled widget.
Sourcepub fn for_disabled(response: &Response) -> Self
pub fn for_disabled(response: &Response) -> Self
Show a tooltip when hovering a disabled widget.
Sourcepub fn at_pointer(self) -> Self
pub fn at_pointer(self) -> Self
Show the tooltip at the pointer position.
Sourcepub fn show<R>(
self,
content: impl FnOnce(&mut Ui) -> R,
) -> Option<InnerResponse<R>>
pub fn show<R>( self, content: impl FnOnce(&mut Ui) -> R, ) -> Option<InnerResponse<R>>
Show the tooltip
pub fn seconds_since_last_tooltip(ctx: &Context) -> f32
Sourcepub fn next_tooltip_id(ctx: &Context, widget_id: Id) -> Id
pub fn next_tooltip_id(ctx: &Context, widget_id: Id) -> Id
What is the id of the next tooltip for this widget?
pub fn tooltip_id(widget_id: Id, tooltip_count: usize) -> Id
Sourcepub fn should_show_tooltip(response: &Response) -> bool
pub fn should_show_tooltip(response: &Response) -> bool
Should we show a tooltip for this response?
Sourcepub fn was_tooltip_open_last_frame(ctx: &Context, widget_id: Id) -> bool
pub fn was_tooltip_open_last_frame(ctx: &Context, widget_id: Id) -> bool
Was this tooltip visible last frame?
Auto Trait Implementations§
impl<'a> Freeze for Tooltip<'a>
impl<'a> !RefUnwindSafe for Tooltip<'a>
impl<'a> Send for Tooltip<'a>
impl<'a> Sync for Tooltip<'a>
impl<'a> Unpin for Tooltip<'a>
impl<'a> !UnwindSafe for Tooltip<'a>
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