Skip to main content

edit

Function edit 

Source
pub fn edit<T: Bindable>(
    ui: &mut Ui,
    binding: Binding<'_, T>,
    widget: impl FnOnce(&mut Ui, &mut T) -> Response,
) -> Response
Expand description

Draws a widget over a binding. widget edits a local copy; what changed goes back as the binding says.

Bound to a store, a drag is one gesture. It is cancelled (the store puts the values back, no undo step is left) when the widget gives it up (cancel_gesture), when Escape ends the drag (see focus), and when the widget is not drawn in a pass while it is open (its host closed mid-drag).