1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
18 class WXDLLIMPEXP_FWD_CORE wxImage
;
21 class WXDLLEXPORT wxCursor
: public wxGDIObject
26 wxCursor(const char bits
[], int width
, int height
,
27 int hotSpotX
= -1, int hotSpotY
= -1,
28 const char maskBits
[] = NULL
);
30 wxCursor(const wxString
& name
, long flags
= wxBITMAP_TYPE_XBM
,
31 int hotSpotX
= 0, int hotSpotY
= 0);
34 wxCursor(const wxImage
& image
);
37 wxCursor(wxStockCursor id
);
41 // Create/get a cursor for the current display
42 WXCursor
GetXCursor(WXDisplay
* display
) const;
45 virtual wxGDIRefData
*CreateGDIRefData() const;
46 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
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
);
54 // Make a cursor from standard id
55 WXCursor
MakeCursor(WXDisplay
* display
, wxStockCursor id
) const;
57 DECLARE_DYNAMIC_CLASS(wxCursor
)
60 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);