Function zng_wgt::node::event_state4
source ยท pub fn event_state4<A0, A1, A2, A3, S0, S1, S2, S3, S>(
child: impl UiNode,
state: impl IntoVar<S>,
default: S,
event0: Event<A0>,
default0: S0,
on_event0: impl FnMut(&A0) -> Option<S0> + Send + 'static,
event1: Event<A1>,
default1: S1,
on_event1: impl FnMut(&A1) -> Option<S1> + Send + 'static,
event2: Event<A2>,
default2: S2,
on_event2: impl FnMut(&A2) -> Option<S2> + Send + 'static,
event3: Event<A3>,
default3: S3,
on_event3: impl FnMut(&A3) -> Option<S3> + Send + 'static,
merge: impl FnMut(S0, S1, S2, S3) -> Option<S> + Send + 'static,
) -> impl UiNode
Expand description
Helper for declaring state properties that depend on four other event states.
When the event#
is received on_event#
is called, if it provides a new value merge
is called, if merge
provides a new value the state
variable is set.