From 59403b6ca80081fa419fbef76c92397db68f1ab1 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Apr 2020 03:11:15 +0200 Subject: Remove `OutOfBounds` variant from `MouseCursor` --- native/src/mouse_cursor.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'native/src/mouse_cursor.rs') diff --git a/native/src/mouse_cursor.rs b/native/src/mouse_cursor.rs index 0dad3edc..8bfa2b44 100644 --- a/native/src/mouse_cursor.rs +++ b/native/src/mouse_cursor.rs @@ -1,9 +1,6 @@ /// The state of the mouse cursor. #[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord)] pub enum MouseCursor { - /// The cursor is out of the bounds of the user interface. - OutOfBounds, - /// The cursor is over a non-interactive widget. Idle, @@ -31,6 +28,6 @@ pub enum MouseCursor { impl Default for MouseCursor { fn default() -> MouseCursor { - MouseCursor::OutOfBounds + MouseCursor::Idle } } -- cgit From 0509710cc59797ce492f55943a6db60c47a2d599 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Apr 2020 03:14:59 +0200 Subject: Add `Crosshair` variant to `MouseCursor` --- native/src/mouse_cursor.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'native/src/mouse_cursor.rs') diff --git a/native/src/mouse_cursor.rs b/native/src/mouse_cursor.rs index 8bfa2b44..78ddb0ae 100644 --- a/native/src/mouse_cursor.rs +++ b/native/src/mouse_cursor.rs @@ -13,12 +13,15 @@ pub enum MouseCursor { /// The cursor is over a grabbable widget. Grab, - /// The cursor is grabbing a widget. - Grabbing, - /// The cursor is over a text widget. Text, + /// The cursor is over a widget that requires precision. + Crosshair, + + /// The cursor is grabbing a widget. + Grabbing, + /// The cursor is resizing a widget horizontally. ResizingHorizontally, -- cgit From ec712c8032a25c5dc65152c3ab39bddaecbdce77 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 29 Apr 2020 03:21:46 +0200 Subject: Move `MouseCursor` to `iced_core` --- native/src/mouse_cursor.rs | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 native/src/mouse_cursor.rs (limited to 'native/src/mouse_cursor.rs') diff --git a/native/src/mouse_cursor.rs b/native/src/mouse_cursor.rs deleted file mode 100644 index 78ddb0ae..00000000 --- a/native/src/mouse_cursor.rs +++ /dev/null @@ -1,36 +0,0 @@ -/// The state of the mouse cursor. -#[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord)] -pub enum MouseCursor { - /// The cursor is over a non-interactive widget. - Idle, - - /// The cursor is over a clickable widget. - Pointer, - - /// The cursor is over a busy widget. - Working, - - /// The cursor is over a grabbable widget. - Grab, - - /// The cursor is over a text widget. - Text, - - /// The cursor is over a widget that requires precision. - Crosshair, - - /// The cursor is grabbing a widget. - Grabbing, - - /// The cursor is resizing a widget horizontally. - ResizingHorizontally, - - /// The cursor is resizing a widget vertically. - ResizingVertically, -} - -impl Default for MouseCursor { - fn default() -> MouseCursor { - MouseCursor::Idle - } -} -- cgit