asdf_overlay_common/cursor.rs
1//! [`Cursor`] enum representing various cursor types.
2
3use bincode::{Decode, Encode};
4use num_derive::FromPrimitive;
5
6/// Describes a possible cursor type.
7#[derive(Debug, Default, Encode, Decode, FromPrimitive, Clone, Copy, Hash, PartialEq, Eq)]
8pub enum Cursor {
9 /// The platform default cursor. Typically an arrow.
10 #[default]
11 Default = 0,
12
13 /// A cursor indicating that helpful information is available.
14 Help,
15
16 /// A cursor indicating that something is clickable, typically a pointing hand.
17 Pointer,
18
19 /// The program is busy at background but can still interactable. Typically an arrow with a loading indicator.
20 Progress,
21
22 /// The program is busy and cannot interact. Typically an hourglass or spinning circle.
23 Wait,
24
25 /// Table cell selection cursor
26 Cell,
27
28 /// Cross cursor typically used for precision selection, e.g. in graphics applications.
29 Crosshair,
30
31 /// A horizontal ibeam cursor for indicating text insertion, typically used for text.
32 Text,
33
34 /// A vertical ibeam cursor for indicating text insertion, typically used for vertical text.
35 VerticalText,
36
37 /// Cursor for indicating something can be aliased or shortcuted.
38 Alias,
39
40 /// Cursor for indicating something can be copied.
41 Copy,
42
43 /// Crossed arrows for moving something.
44 Move,
45
46 /// Not allowed cursor (typically a circle with a line through it)
47 NotAllowed,
48
49 /// Hand cursor for something can be grabbed. e.g. draggable item
50 Grab,
51
52 /// Hand grabbing cursor.
53 Grabbing,
54
55 /// Cursor for horizontal resizing (e.g. left-right arrows with a bar in the middle)
56 ColResize,
57
58 /// Cursor for vertical resizing (e.g. up-down arrows with a bar in the middle)
59 RowResize,
60
61 /// Cursor for horizontal resizing (e.g. left-right arrows)
62 EastWestResize,
63
64 /// Cursor for vertical resizing (e.g. up-down arrows)
65 NorthSouthResize,
66
67 /// Cursor for diagonal resizing (e.g. top-left to bottom-right arrows)
68 NorthEastSouthWestResize,
69
70 /// Cursor for diagonal resizing (e.g. top-right to bottom-left arrows)
71 NorthWestSouthEastResize,
72
73 /// Cursor for something can be zoomed in. Typically a magnifying glass with a plus sign.
74 ZoomIn,
75
76 /// Cursor for something can be zoomed out. Typically a magnifying glass with a minus sign.
77 ZoomOut,
78
79 /// Windows specific up arrow cursor matching `IDC_UPARROW`
80 UpArrow,
81
82 /// Windows specific pin cursor matching `IDC_PIN`
83 Pin,
84
85 /// Windows specific person cursor matching `IDC_PERSON`
86 Person,
87
88 /// Windows specific pen cursor matching `32631`
89 Pen,
90
91 /// Windows specific cd cursor matching `32663`
92 Cd,
93
94 /// Panning cursors with crossed arrows
95 PanMiddle,
96
97 /// Panning cursors with horizontal arrows
98 PanMiddleHorizontal,
99
100 /// Panning cursors with vertical arrows
101 PanMiddleVertical,
102
103 /// Panning cursors with a arrow to right.
104 PanEast,
105
106 /// Panning cursors with a arrow to top.
107 PanNorth,
108
109 /// Panning cursors with arrows to top and right.
110 PanNorthEast,
111
112 /// Panning cursors with arrows to top and left.
113 PanNorthWest,
114
115 /// Panning cursors with a arrow to down.
116 PanSouth,
117
118 /// Panning cursors with arrows to down and right.
119 PanSouthEast,
120
121 /// Panning cursors with arrows to down and left.
122 PanSouthWest,
123
124 /// Panning cursors with a arrow to left.
125 PanWest,
126}