Enum wayrs_utils::cursor::CursorShape

source ·
#[non_exhaustive]
#[repr(u32)]
pub enum CursorShape {
Show 34 variants Default = 1, ContextMenu = 2, Help = 3, Pointer = 4, Progress = 5, Wait = 6, Cell = 7, Crosshair = 8, Text = 9, VerticalText = 10, Alias = 11, Copy = 12, Move = 13, NoDrop = 14, NotAllowed = 15, Grab = 16, Grabbing = 17, EResize = 18, NResize = 19, NeResize = 20, NwResize = 21, SResize = 22, SeResize = 23, SwResize = 24, WResize = 25, EwResize = 26, NsResize = 27, NeswResize = 28, NwseResize = 29, ColResize = 30, RowResize = 31, AllScroll = 32, ZoomIn = 33, ZoomOut = 34,
}
Available on crate feature cursor only.
Expand description

cursor shapes

This enum describes cursor shapes.

The names are taken from the CSS W3C specification: https://w3c.github.io/csswg-drafts/css-ui/#cursor

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Default = 1

default cursor

Since version 1.

§

ContextMenu = 2

a context menu is available for the object under the cursor

Since version 1.

§

Help = 3

help is available for the object under the cursor

Since version 1.

§

Pointer = 4

pointer that indicates a link or another interactive element

Since version 1.

§

Progress = 5

progress indicator

Since version 1.

§

Wait = 6

program is busy, user should wait

Since version 1.

§

Cell = 7

a cell or set of cells may be selected

Since version 1.

§

Crosshair = 8

simple crosshair

Since version 1.

§

Text = 9

text may be selected

Since version 1.

§

VerticalText = 10

vertical text may be selected

Since version 1.

§

Alias = 11

drag-and-drop: alias of/shortcut to something is to be created

Since version 1.

§

Copy = 12

drag-and-drop: something is to be copied

Since version 1.

§

Move = 13

drag-and-drop: something is to be moved

Since version 1.

§

NoDrop = 14

drag-and-drop: the dragged item cannot be dropped at the current cursor location

Since version 1.

§

NotAllowed = 15

drag-and-drop: the requested action will not be carried out

Since version 1.

§

Grab = 16

drag-and-drop: something can be grabbed

Since version 1.

§

Grabbing = 17

drag-and-drop: something is being grabbed

Since version 1.

§

EResize = 18

resizing: the east border is to be moved

Since version 1.

§

NResize = 19

resizing: the north border is to be moved

Since version 1.

§

NeResize = 20

resizing: the north-east corner is to be moved

Since version 1.

§

NwResize = 21

resizing: the north-west corner is to be moved

Since version 1.

§

SResize = 22

resizing: the south border is to be moved

Since version 1.

§

SeResize = 23

resizing: the south-east corner is to be moved

Since version 1.

§

SwResize = 24

resizing: the south-west corner is to be moved

Since version 1.

§

WResize = 25

resizing: the west border is to be moved

Since version 1.

§

EwResize = 26

resizing: the east and west borders are to be moved

Since version 1.

§

NsResize = 27

resizing: the north and south borders are to be moved

Since version 1.

§

NeswResize = 28

resizing: the north-east and south-west corners are to be moved

Since version 1.

§

NwseResize = 29

resizing: the north-west and south-east corners are to be moved

Since version 1.

§

ColResize = 30

resizing: that the item/column can be resized horizontally

Since version 1.

§

RowResize = 31

resizing: that the item/row can be resized vertically

Since version 1.

§

AllScroll = 32

something can be scrolled in any direction

Since version 1.

§

ZoomIn = 33

something can be zoomed in

Since version 1.

§

ZoomOut = 34

something can be zoomed out

Since version 1.

Trait Implementations§

source§

impl Clone for Shape

source§

fn clone(&self) -> Shape

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Shape

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for Shape

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Shape

source§

fn eq(&self, other: &Shape) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<u32> for Shape

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(val: u32) -> Result<Shape, ()>

Performs the conversion.
source§

impl Copy for Shape

source§

impl Eq for Shape

source§

impl StructuralPartialEq for Shape

Auto Trait Implementations§

§

impl Freeze for Shape

§

impl RefUnwindSafe for Shape

§

impl Send for Shape

§

impl Sync for Shape

§

impl Unpin for Shape

§

impl UnwindSafe for Shape

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.