pub fn on_pre_command<U, CB, E, EB, H>(
child: U,
command_builder: CB,
enabled_builder: EB,
handler: H,
) -> impl UiNodewhere
U: UiNode,
CB: FnMut() -> Command + Send + 'static,
E: Var<bool>,
EB: FnMut() -> E + Send + 'static,
H: WidgetHandler<CommandArgs>,
Expand description
Helper for declaring command preview handlers.
Other then the route this helper behaves exactly like on_command
.
ยงRoute
The event handler
is called before the on_command
equivalent at the same context level. If the command event
targets more then one widget and one widget contains the other, the handler
is called on the inner widget first.