Btk
cursor.hpp
1 #if !defined(_BTK_CURSOR_HPP_)
2 #define _BTK_CURSOR_HPP_
3 struct SDL_Cursor;
4 namespace Btk{
5  class PixBuf;
10  enum class SystemCursor{
11  Arrow,
12  Ibeam,
13  Wait,
14  Crosshair,
15  Hand
16  };
21  class Cursor{
22  public:
27  Cursor():cursor(nullptr),own(false){};
40  Cursor(const PixBuf &pixbuf,int hot_x = 0,int hot_y = 0);
41  ~Cursor();
46  void set() const;
47 
52  static void reset();
58  static Cursor Default();
64  static Cursor Current();
65  private:
66  Cursor(SDL_Cursor *c,bool w):
67  cursor(c),
68  own(w){};
69 
70 
71  SDL_Cursor *cursor;
72  bool own;
73  };
74 }
75 
76 
77 #endif // _BTK_CURSOR_HPP_
Cursor()
Construct a new empty Cursor object.
Definition: cursor.hpp:27
This header include many useful containers.
Definition: async.hpp:7
SystemCursor
SystemCursor from SDL_mouse.h.
Definition: cursor.hpp:10
Definition: pixels.hpp:32
Mouse's cursor.
Definition: cursor.hpp:21