1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "cursor.h"
19 #include "wx/msw/gdiimage.h"
21 class WXDLLEXPORT wxImage
;
23 class WXDLLEXPORT wxCursorRefData
: public wxGDIImageRefData
27 virtual ~wxCursorRefData() { Free(); }
37 class WXDLLEXPORT wxCursor
: public wxGDIImage
43 wxCursor(const wxCursor
& cursor
) { Ref(cursor
); }
44 wxCursor(const wxImage
& image
);
45 wxCursor(const char bits
[], int width
, int height
,
46 int hotSpotX
= -1, int hotSpotY
= -1,
47 const char maskBits
[] = NULL
);
48 wxCursor(const wxString
& name
,
49 long flags
= wxBITMAP_TYPE_CUR_RESOURCE
,
50 int hotSpotX
= 0, int hotSpotY
= 0);
51 wxCursor(int cursor_type
);
54 wxCursor
& operator = (const wxCursor
& cursor
) { if (*this == cursor
) return (*this); Ref(cursor
); return *this; }
55 bool operator == (const wxCursor
& cursor
) const { return m_refData
== cursor
.m_refData
; }
56 bool operator != (const wxCursor
& cursor
) const { return m_refData
!= cursor
.m_refData
; }
58 void SetHCURSOR(WXHCURSOR cursor
) { SetHandle((WXHANDLE
)cursor
); }
59 WXHCURSOR
GetHCURSOR() const { return (WXHCURSOR
)GetHandle(); }
62 virtual wxGDIImageRefData
*CreateData() const { return new wxCursorRefData
; }
65 DECLARE_DYNAMIC_CLASS(wxCursor
)