]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/cursor.h
Fixed wxWindowOS2::Reparent.
[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 // 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
18 class WXDLLIMPEXP_FWD_CORE wxImage;
19
20 // Cursor
21 class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
22 {
23 public:
24 wxCursor();
25
26 wxCursor(const char bits[], int width, int height,
27 int hotSpotX = -1, int hotSpotY = -1,
28 const char maskBits[] = NULL);
29
30 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
31 int hotSpotX = 0, int hotSpotY = 0);
32
33 #if wxUSE_IMAGE
34 wxCursor(const wxImage& image);
35 #endif
36
37 wxCursor(wxStockCursor id);
38 virtual ~wxCursor();
39
40 // Motif-specific.
41 // Create/get a cursor for the current display
42 WXCursor GetXCursor(WXDisplay* display) const;
43
44 protected:
45 virtual wxGDIRefData *CreateGDIRefData() const;
46 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
47
48 private:
49 void Create(const char bits[], int width, int height,
50 int hotSpotX = -1, int hotSpotY = -1,
51 const char maskBits[] = NULL);
52 void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
53
54 // Make a cursor from standard id
55 WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
56
57 DECLARE_DYNAMIC_CLASS(wxCursor)
58 };
59
60 extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
61
62 #endif
63 // _WX_CURSOR_H_