]> git.mxchange.org Git - flightgear.git/blob - src/GUI/MouseCursor.hxx
MouseInput changes to support hover.
[flightgear.git] / src / GUI / MouseCursor.hxx
1
2 // MouseCursor.hxx - abstract inteface for  mouse cursor control
3
4 #ifndef FG_GUI_MOUSE_CURSOR_HXX
5 #define FG_GUI_MOUSE_CURSOR_HXX 1
6
7 class SGPropertyNode;
8
9 class FGMouseCursor
10 {
11 public:
12     static FGMouseCursor* instance();
13
14     virtual void setAutoHideTimeMsec(unsigned int aMsec);
15   
16     enum Cursor
17     {
18         CURSOR_ARROW,
19         CURSOR_HAND,
20         CURSOR_CROSSHAIR,
21         CURSOR_IBEAM, ///< for editing text
22         CURSOR_IN_OUT, ///< arrow pointing into / out of the screen
23         CURSOR_LEFT_RIGHT,
24         CURSOR_UP_DOWN,
25         CURSOR_SPIN_CW,
26         CURSOR_SPIN_CCW
27     };
28   
29     virtual void setCursor(Cursor aCursor) = 0;
30     
31     virtual void setCursorVisible(bool aVis) = 0;
32     
33     virtual void hideCursorUntilMouseMove() = 0;
34     
35     virtual void mouseMoved() = 0;
36     
37     static Cursor cursorFromString(const char* str);
38
39 protected:
40     FGMouseCursor();
41     
42     bool setCursorCommand(const SGPropertyNode* arg);
43     
44     unsigned int mAutoHideTimeMsec;
45 };
46
47 #endif // FG_GUI_MOUSE_CURSOR_HXX