Skip to main content

drag_cursor

Function drag_cursor 

Source
pub fn drag_cursor(response: &Response, kind: DragKind) -> DragCursorFor<'_>
Expand description

Shows the cursor of a drag of kind for a response: its drag cursor every pass it is dragged, wherever the pointer is; its hover cursor while it is hovered and nothing is dragged, as the hover policy says (HoverPolicy). Called each pass the widget is drawn, after anything else that sets the cursor for it.

It returns what to show, applied when dropped (at the end of the statement): the widget may change it first.

// The response senses clicks only to take the focus: dragging is
// its only action.
pointer::drag_cursor(&response, DragKind::SplitRows).clicks(false);