1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCursor class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "cursor.h"
19 #include "wx/bitmap.h"
22 class WXDLLEXPORT wxCursor
: public wxBitmap
24 DECLARE_DYNAMIC_CLASS(wxCursor
)
30 wxCursor(const wxCursor
& cursor
)
34 wxCursor(const char bits
[], int width
, int height
, int hotSpotX
= -1, int hotSpotY
= -1,
35 const char maskBits
[] = NULL
);
37 wxCursor(const wxImage
& image
) ;
38 wxCursor(const char **bits
) ;
39 wxCursor(char **bits
) ;
40 wxCursor(const wxString
& name
, long flags
= wxBITMAP_TYPE_MACCURSOR_RESOURCE
,
41 int hotSpotX
= 0, int hotSpotY
= 0);
43 wxCursor(int cursor_type
);
46 bool CreateFromXpm(const char **bits
) ;
47 virtual bool Ok() const ;
49 inline wxCursor
& operator = (const wxCursor
& cursor
) { if (*this == cursor
) return (*this); Ref(cursor
); return *this; }
50 inline bool operator == (const wxCursor
& cursor
) const { return m_refData
== cursor
.m_refData
; }
51 inline bool operator != (const wxCursor
& cursor
) const { return m_refData
!= cursor
.m_refData
; }
53 void MacInstall() const ;
55 void SetHCURSOR(WXHCURSOR cursor
);
56 inline WXHCURSOR
GetHCURSOR() const ;
58 void CreateFromImage(const wxImage
& image
) ;
61 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);