Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / motif / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_CURSOR_H_
12 #define _WX_CURSOR_H_
13
14 #include "wx/gdiobj.h"
15 #include "wx/gdicmn.h"
16
17 class WXDLLIMPEXP_FWD_CORE wxImage;
18
19 // Cursor
20 class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
21 {
22 public:
23 wxCursor();
24
25 wxCursor(const char bits[], int width, int height,
26 int hotSpotX = -1, int hotSpotY = -1,
27 const char maskBits[] = NULL,
28 const wxColour* fg = NULL, const wxColour* bg = NULL);
29
30 wxCursor(const wxString& name,
31 wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
32 int hotSpotX = 0, int hotSpotY = 0);
33
34 #if wxUSE_IMAGE
35 wxCursor(const wxImage& image);
36 #endif
37
38 wxCursor(wxStockCursor id) { InitFromStock(id); }
39 #if WXWIN_COMPATIBILITY_2_8
40 wxCursor(int id) { InitFromStock((wxStockCursor)id); }
41 #endif
42
43 virtual ~wxCursor();
44
45 // Motif-specific.
46 // Create/get a cursor for the current display
47 WXCursor GetXCursor(WXDisplay* display) const;
48
49 protected:
50 virtual wxGDIRefData *CreateGDIRefData() const;
51 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
52
53 private:
54 void InitFromStock(wxStockCursor);
55
56 void Create(const char bits[], int width, int height,
57 int hotSpotX = -1, int hotSpotY = -1,
58 const char maskBits[] = NULL);
59 void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
60
61 // Make a cursor from standard id
62 WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
63
64 DECLARE_DYNAMIC_CLASS(wxCursor)
65 };
66
67 extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
68
69 #endif
70 // _WX_CURSOR_H_