1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCursor class
4 // Author: David Elliott <dfe@cox.net>
8 // Copyright: (c) David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COCOA_CURSOR_H_
13 #define _WX_COCOA_CURSOR_H_
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "cursor.h"
19 #include "wx/bitmap.h"
21 class WXDLLEXPORT wxCursorRefData
: public wxBitmapRefData
23 DECLARE_NO_COPY_CLASS(wxCursorRefData
)
25 friend class WXDLLEXPORT wxBitmap
;
26 friend class WXDLLEXPORT wxCursor
;
34 #define M_CURSORDATA ((wxCursorRefData *)m_refData)
35 #define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
38 class WXDLLEXPORT wxCursor
: public wxBitmap
40 DECLARE_DYNAMIC_CLASS(wxCursor
)
46 wxCursor(const wxCursor
& cursor
)
50 wxCursor(const char bits
[], int width
, int height
, int hotSpotX
= -1, int hotSpotY
= -1,
51 const char maskBits
[] = NULL
);
53 wxCursor(const wxString
& name
, long flags
= 0,
54 int hotSpotX
= 0, int hotSpotY
= 0);
56 wxCursor(int cursor_type
);
59 virtual bool Ok() const { return m_refData
; }
61 inline wxCursor
& operator = (const wxCursor
& cursor
) { if (*this == cursor
) return (*this); Ref(cursor
); return *this; }
62 inline bool operator == (const wxCursor
& cursor
) { return m_refData
== cursor
.m_refData
; }
63 inline bool operator != (const wxCursor
& cursor
) { return m_refData
!= cursor
.m_refData
; }
67 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);
69 #endif // _WX_COCOA_CURSOR_H_