zng::widget

Function on_pre_node_op

source
pub fn on_pre_node_op(
    child: impl UiNode,
    handler: impl WidgetHandler<OnNodeOpArgs>,
) -> impl UiNode
Expand description

P Preview on_node_op event.

This property calls handler for any widget node operation, before most of the widget content processes the operation. This means that the handler is raised before any on_node_op handler. Note that properties of NestGroup::EVENT or lower can still process the operation before this event.

§Handlers

This property accepts any WidgetHandler, including the async handlers. Use one of the handler macros, hn!, hn_once!, async_hn! or async_hn_once!, to declare a handler closure.

§Async

The async handlers spawn a task that is associated with the widget, it will only update when the widget updates, so the task pauses when the widget is deinited, and is canceled when the widget is dropped.