Function zng_wgt_input::pointer_capture::capture_pointer_on_init
source ยท pub fn capture_pointer_on_init(
child: impl UiNode,
mode: impl IntoVar<CaptureMode>,
) -> impl UiNode
Expand description
P
Capture mouse and touch for the widget on init.
The capture happens only if any mouse button or touch is pressed on the window and the mode
is Widget
or Subtree
.
Pointer captures are released when all mouse buttons stop being pressed on the window.
The capture is also released back to window if the mode
changes to Window
when the mouse is captured for the widget.