pub fn token(
ui: &mut Ui,
label: &str,
kind: Token,
tone: Tone,
latched: bool,
palette: &Palette,
style: &WidgetStyle,
) -> ResponseExpand description
A badge or a chip.
A badge is the table model’s (wiki table-model), as makeover-webview
draws it: a fill of its tone surface inside a one-point edge in its tone,
the label in content ink. A neutral badge fills with the raised surface and
takes the border for its edge. The tone is never the ink, which measured
1.34:1 as text on goingson’s warning.
A chip is outlined in its tone, and filled while latched.
A chip answers a click and a badge does not, which is
Token::interactive and is the whole difference between the members. The
Response comes back either way, so a caller that presses a badge is
pressing something this function said was not interactive; the sense is what
makes egui agree.
latched is a chip that is switched on, and it fills rather than outlines. A
terminal has to collide latched with focus because it has one spare axis for
two facts; egui does not, so it does not.
A chip’s removable half is not drawn, on makeover-tui’s reasoning: a second
control inside a token is a question for whoever owns the interaction rather
than for a drawing.