Function zng::pointer_capture::capture_pointer

source ยท
pub fn capture_pointer(
    child: impl UiNode,
    mode: impl IntoVar<CaptureMode>,
) -> impl UiNode
Expand description

P Capture mouse and touch for the widget on press.

The capture happens only if any mouse button or touch is pressed on the window and the mode is Widget or Subtree.

Captures are released when all mouse buttons and touch contacts stop being pressed on the window. The capture is also released back to window if the mode changes to Window.