summaryrefslogblamecommitdiffstats
path: root/native/src/mouse_cursor.rs
blob: 78ddb0ae0d6cd0b2b38faad874d7700c3cfad457 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
                                  
                                                             
                      











                                                    

                                         
 





                                                            




                                                     
 


                                 
                         

     
/// 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
    }
}