Rename MouseCursor to mouse::Interaction
This commit is contained in:
parent
d4c4198f72
commit
98bc8cf2a7
35 changed files with 170 additions and 171 deletions
|
|
@ -22,7 +22,6 @@ mod background;
|
|||
mod color;
|
||||
mod font;
|
||||
mod length;
|
||||
mod mouse_cursor;
|
||||
mod point;
|
||||
mod rectangle;
|
||||
mod size;
|
||||
|
|
@ -33,7 +32,6 @@ pub use background::Background;
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
//! Reuse basic mouse types.
|
||||
mod button;
|
||||
mod event;
|
||||
mod interaction;
|
||||
|
||||
pub use button::Button;
|
||||
pub use event::{Event, ScrollDelta};
|
||||
pub use interaction::Interaction;
|
||||
|
|
|
|||
20
core/src/mouse/interaction.rs
Normal file
20
core/src/mouse/interaction.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/// The interaction of a mouse cursor.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum Interaction {
|
||||
Idle,
|
||||
Pointer,
|
||||
Grab,
|
||||
Text,
|
||||
Crosshair,
|
||||
Working,
|
||||
Grabbing,
|
||||
ResizingHorizontally,
|
||||
ResizingVertically,
|
||||
}
|
||||
|
||||
impl Default for Interaction {
|
||||
fn default() -> Interaction {
|
||||
Interaction::Idle
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue