Move MouseCursor to iced_core
This commit is contained in:
parent
52719c7076
commit
ec712c8032
5 changed files with 7 additions and 6 deletions
|
|
@ -23,6 +23,7 @@ mod button_state;
|
|||
mod color;
|
||||
mod font;
|
||||
mod length;
|
||||
mod mouse_cursor;
|
||||
mod point;
|
||||
mod rectangle;
|
||||
mod size;
|
||||
|
|
@ -34,6 +35,7 @@ pub use button_state::ButtonState;
|
|||
pub use color::Color;
|
||||
pub use font::Font;
|
||||
pub use length::Length;
|
||||
pub use mouse_cursor::MouseCursor;
|
||||
pub use point::Point;
|
||||
pub use rectangle::Rectangle;
|
||||
pub use size::Size;
|
||||
|
|
|
|||
36
core/src/mouse_cursor.rs
Normal file
36
core/src/mouse_cursor.rs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/// 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue