Function zng_wgt::node::event_state3

source ยท
pub fn event_state3<A0, A1, A2, S0, S1, S2, 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,
    merge: impl FnMut(S0, S1, S2) -> Option<S> + Send + 'static,
) -> impl UiNode
where A0: EventArgs, A1: EventArgs, A2: EventArgs, S0: VarValue, S1: VarValue, S2: VarValue, S: VarValue,
Expand description

Helper for declaring state properties that depend on three 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.