Skip to main content

button_with

Function button_with 

Source
pub fn button_with(
    ui: &mut Ui<'_>,
    key: &str,
    text: &str,
    spec: NodeSpec,
    hint: Option<&str>,
)
Expand description

button with its spec in the caller’s hands: spec is button_spec plus what the caller declared on it — the on_click, and the rows the stock button admits in every binding (schema::BUTTON_ROWS_JSX): a label when the text is not the name, a description, disabled, and the hover tracking and description a tooltip sets, whose float is hint — drawn under the button while it is hovered, as every binding’s tooltip prop floats one. Keyed by key, so a label that changes need not re-key the node. A disabled button is dimmed (BUTTON_DISABLED_OPACITY) as well as inert.

This is what <button>, button { } and kui_button_with lower to, so a binding cannot end up with a button of its own.