1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCursor class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/bitmap.h"
17 class WXDLLEXPORT wxCursorRefData
: public wxGDIImageRefData
21 virtual ~wxCursorRefData() { Free(); }
22 virtual void Free(void);
23 bool m_bDestroyCursor
;
24 }; // end of CLASS wxCursorRefData
26 #define M_CURSORDATA ((wxCursorRefData *)m_refData)
27 #define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
30 class WXDLLEXPORT wxCursor
: public wxBitmap
35 wxCursor(const wxImage
& rImage
);
37 wxCursor( const char acBits
[]
42 ,const char zMaskBits
[] = NULL
44 wxCursor( const wxString
& rsName
45 ,long lFlags
= wxBITMAP_TYPE_CUR_RESOURCE
49 wxCursor(int nCursorType
);
50 inline ~wxCursor() { }
51 inline bool operator == (const wxCursor
& rCursor
) const { return m_refData
== rCursor
.m_refData
; }
52 inline bool operator != (const wxCursor
& rCursor
) const { return m_refData
!= rCursor
.m_refData
; }
54 inline WXHCURSOR
GetHCURSOR(void) const { return (M_CURSORDATA
? M_CURSORDATA
->m_hCursor
: 0); }
55 inline void SetHCURSOR(WXHCURSOR hCursor
) { SetHandle((WXHANDLE
)hCursor
); }
58 inline virtual wxGDIImageRefData
* CreateData(void) const { return (new wxCursorRefData
); }
61 DECLARE_DYNAMIC_CLASS(wxCursor
)
62 }; // end of CLASS wxCursor