#[non_exhaustive]pub enum DragKind {
Show 14 variants
Pan,
Scrub,
Move,
Carry,
Value,
Point,
Select,
Text,
ResizeHorizontal,
ResizeVertical,
ResizeNwSe,
ResizeNeSw,
SplitColumns,
SplitRows,
}Expand description
What a drag does to what it holds: the meaning a drag’s cursor is
keyed by, whatever the widget. A widget names the kind of each of its
drags; the profile in force says which cursor each kind shows,
hovered and dragged, and when the hover cursor shows
(DragKind::cursors, Profile::drag_cursors, HoverPolicy).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pan
Content panned under a fixed frame: an image, a graph’s canvas, a timeline’s lanes. An open hand, closed while dragging.
Scrub
Content scrubbed under a fixed playhead (a deck’s waveform). An open hand, closed while dragging.
Move
An item moved where the pointer takes it: a node, a clip, a band, a navigator’s view frame. Move (a four-way arrow).
Carry
An item carried to a place to drop it: a row, a tab, a wire’s end. The arrow until it moves, then a closed hand.
Value
A value dragged along a line: a slider, a playhead on a ruler. The arrow until it moves, then a horizontal resize.
Point
A point placed under the pointer: a colour wheel’s puck, a curve’s point. The arrow until it moves, then a crosshair.
Select
A rubber band selecting what it covers. The arrow until it moves, then a crosshair.
Text
Text selected by dragging over it. An I-beam.
ResizeHorizontal
An edge or a separator resized sideways.
ResizeVertical
An edge or a separator resized up and down.
ResizeNwSe
A corner resized along the top-left to bottom-right diagonal.
ResizeNeSw
A corner resized along the top-right to bottom-left diagonal.
SplitColumns
A separator between panes side by side, dragged sideways: a splitter, a side area’s or a flyout’s edge. A column resize.
SplitRows
A separator between panes one above the other, dragged up and down. A row resize.
Implementations§
Source§impl DragKind
impl DragKind
pub fn parse(text: &str) -> Option<DragKind>
Sourcepub fn cursors(self) -> DragCursor
pub fn cursors(self) -> DragCursor
The cursors it shows unless a kit or a profile says otherwise, as
CSS cursor names (CURSOR_NAMES), with its hover policy:
HoverPolicy::Always for text (an I-beam over text, which a
click also places the caret in), HoverPolicy::OnlyAction for
the others.