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 WXDLLIMPEXP_CORE wxCursor
: public wxGDIObject
26 wxCursor(const char bits
[], int width
, int height
,
27 int hotSpotX
= -1, int hotSpotY
= -1,
28 const char maskBits
[] = NULL
,
29 const wxColour
* fg
= NULL
, const wxColour
* bg
= NULL
);
31 wxCursor(const wxString
& name
,
32 wxBitmapType type
= wxCURSOR_DEFAULT_TYPE
,
33 int hotSpotX
= 0, int hotSpotY
= 0);
36 wxCursor(const wxImage
& image
);
39 wxCursor(wxStockCursor id
) { InitFromStock(id
); }
40 #if WXWIN_COMPATIBILITY_2_8
41 wxCursor(int id
) { InitFromStock((wxStockCursor
)id
); }
47 // Create/get a cursor for the current display
48 WXCursor
GetXCursor(WXDisplay
* display
) const;
51 virtual wxGDIRefData
*CreateGDIRefData() const;
52 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
55 void InitFromStock(wxStockCursor
);
57 void Create(const char bits
[], int width
, int height
,
58 int hotSpotX
= -1, int hotSpotY
= -1,
59 const char maskBits
[] = NULL
);
60 void Create(WXPixmap cursor
, WXPixmap mask
, int hotSpotX
, int hotSpotY
);
62 // Make a cursor from standard id
63 WXCursor
MakeCursor(WXDisplay
* display
, wxStockCursor id
) const;
65 DECLARE_DYNAMIC_CLASS(wxCursor
)
68 extern WXDLLIMPEXP_CORE
void wxSetCursor(const wxCursor
& cursor
);