]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/cursor.h
76b695a411b3c8071c5a22cbe541c65060d62886
[wxWidgets.git] / include / wx / x11 / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CURSOR_H_
13 #define _WX_CURSOR_H_
14
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
17 #include "wx/colour.h"
18
19 class WXDLLIMPEXP_FWD_CORE wxImage;
20
21 //-----------------------------------------------------------------------------
22 // wxCursor
23 //-----------------------------------------------------------------------------
24
25 class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
26 {
27 public:
28 wxCursor();
29 wxCursor(wxStockCursor id) { InitFromStock(id); }
30 #if WXWIN_COMPATIBILITY_2_8
31 wxCursor(int id) { InitFromStock((wxStockCursor)id); }
32 #endif
33 #if wxUSE_IMAGE
34 wxCursor( const wxImage & image );
35 #endif
36
37 wxCursor(const wxString& name,
38 wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
39 int hotSpotX = 0, int hotSpotY = 0);
40 virtual ~wxCursor();
41
42 // implementation
43
44 WXCursor GetCursor() const;
45
46 protected:
47 void InitFromStock(wxStockCursor);
48
49 virtual wxGDIRefData *CreateGDIRefData() const;
50 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
51
52 private:
53 DECLARE_DYNAMIC_CLASS(wxCursor)
54 };
55
56 #endif // _WX_CURSOR_H_