plushie/widget/tooltip

Tooltip widget builder. First child is the target, second is tooltip content.

Types

Option type for tooltip properties.

pub type Opt {
  Position(position.Position)
  Gap(Float)
  Padding(Float)
  SnapWithinViewport(Bool)
  Delay(Int)
  Style(String)
  A11y(a11y.A11y)
}

Constructors

pub opaque type Tooltip

Values

pub fn a11y(tt: Tooltip, a: a11y.A11y) -> Tooltip

Set accessibility properties for this widget.

pub fn build(tt: Tooltip) -> node.Node

Build the tooltip into a renderable Node.

pub fn delay(tt: Tooltip, d: Int) -> Tooltip

Set the delay in milliseconds.

pub fn extend(tt: Tooltip, children: List(node.Node)) -> Tooltip

Add multiple child nodes.

pub fn gap(tt: Tooltip, g: Float) -> Tooltip

Set the gap between elements.

pub fn new(id: String, tip: String) -> Tooltip

Create a new tooltip builder.

pub fn padding(tt: Tooltip, p: Float) -> Tooltip

Set the padding in pixels.

The renderer’s tooltip widget accepts a scalar thickness only; iced’s tooltip API has no per-side padding.

pub fn position(tt: Tooltip, p: position.Position) -> Tooltip

Set the position.

pub fn push(tt: Tooltip, child: node.Node) -> Tooltip

Add a child node.

pub fn snap_within_viewport(
  tt: Tooltip,
  enabled: Bool,
) -> Tooltip

Set whether the tooltip snaps to the viewport.

pub fn style(tt: Tooltip, s: String) -> Tooltip

Set the style.

pub fn with_opts(tt: Tooltip, opts: List(Opt)) -> Tooltip

Apply a list of options to a tooltip builder.

Search Document