#[non_exhaustive]
#[repr(u32)]
pub enum Shape {
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,
}
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

§

ContextMenu = 2

a context menu is available for the object under the cursor

§

Help = 3

help is available for the object under the cursor

§

Pointer = 4

pointer that indicates a link or another interactive element

§

Progress = 5

progress indicator

§

Wait = 6

program is busy, user should wait

§

Cell = 7

a cell or set of cells may be selected

§

Crosshair = 8

simple crosshair

§

Text = 9

text may be selected

§

VerticalText = 10

vertical text may be selected

§

Alias = 11

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

§

Copy = 12

drag-and-drop: something is to be copied

§

Move = 13

drag-and-drop: something is to be moved

§

NoDrop = 14

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

§

NotAllowed = 15

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

§

Grab = 16

drag-and-drop: something can be grabbed

§

Grabbing = 17

drag-and-drop: something is being grabbed

§

EResize = 18

resizing: the east border is to be moved

§

NResize = 19

resizing: the north border is to be moved

§

NeResize = 20

resizing: the north-east corner is to be moved

§

NwResize = 21

resizing: the north-west corner is to be moved

§

SResize = 22

resizing: the south border is to be moved

§

SeResize = 23

resizing: the south-east corner is to be moved

§

SwResize = 24

resizing: the south-west corner is to be moved

§

WResize = 25

resizing: the west border is to be moved

§

EwResize = 26

resizing: the east and west borders are to be moved

§

NsResize = 27

resizing: the north and south borders are to be moved

§

NeswResize = 28

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

§

NwseResize = 29

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

§

ColResize = 30

resizing: that the item/column can be resized horizontally

§

RowResize = 31

resizing: that the item/row can be resized vertically

§

AllScroll = 32

something can be scrolled in any direction

§

ZoomIn = 33

something can be zoomed in

§

ZoomOut = 34

something can be zoomed out

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

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

impl From<Shape> for u32

source§

fn from(val: Shape) -> u32

Converts to this type from the input type.
source§

impl Hash for Shape

source§

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

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 Ord for Shape

source§

fn cmp(&self, other: &Shape) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. 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 PartialOrd for Shape

source§

fn partial_cmp(&self, other: &Shape) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
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 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
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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.