pub fn event_state<A: EventArgs, S: VarValue>(
child: impl IntoUiNode,
state: impl IntoVar<S>,
default: S,
event: Event<A>,
on_event: impl FnMut(&A) -> Option<S> + Send + 'static,
) -> UiNodeExpand description
Helper for declaring state properties that depend on a single event.
When the event is received on_event is called, if it provides a new state the state variable is set.