#[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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DragKind
impl<'de> Deserialize<'de> for DragKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DragKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DragKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Ord for DragKind
impl Ord for DragKind
Source§impl PartialOrd for DragKind
impl PartialOrd for DragKind
Source§impl Serialize for DragKind
impl Serialize for DragKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for DragKind
impl Eq for DragKind
impl StructuralPartialEq for DragKind
Auto Trait Implementations§
impl Freeze for DragKind
impl RefUnwindSafe for DragKind
impl Send for DragKind
impl Sync for DragKind
impl Unpin for DragKind
impl UnsafeUnpin for DragKind
impl UnwindSafe for DragKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more