friend class wxCursor;
- DECLARE_NO_ASSIGN_CLASS(wxCursorRefData)
+ wxDECLARE_NO_ASSIGN_CLASS(wxCursorRefData);
};
#define M_CURSORDATA static_cast<wxCursorRefData*>(m_refData)
wxCursorRefData::wxCursorRefData(const wxCursorRefData& cursor)
{
- // FIXME: need to copy the cursor
m_hCursor = NULL;
#if wxOSX_USE_COCOA
- wxUnusedVar(cursor);
+ m_hCursor = (WX_NSCursor) wxMacCocoaRetain(cursor.m_hCursor);
#elif wxOSX_USE_CARBON
+ // FIXME: need to copy the cursor
m_disposeHandle = false;
m_releaseHandle = false;
m_isColorCursor = cursor.m_isColorCursor;
#endif
}
-wxCursor::wxCursor(const char* const* bits)
-{
- (void) CreateFromXpm(bits);
-}
-
wxGDIRefData *wxCursor::CreateGDIRefData() const
{
return new wxCursorRefData;
return new wxCursorRefData(*static_cast<const wxCursorRefData *>(data));
}
-bool wxCursor::CreateFromXpm(const char* const* bits)
-{
-#if wxUSE_IMAGE
- wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") );
- wxXPMDecoder decoder;
- wxImage img = decoder.ReadData(bits);
- wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") );
- CreateFromImage( img ) ;
- return true;
-#else
- return false;
-#endif
-}
-
WXHCURSOR wxCursor::GetHCURSOR() const
{
return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0);
case wxCURSOR_CLOSED_HAND:
M_CURSORDATA->m_themeCursor = kThemeClosedHandCursor;
break;
-
+
case wxCURSOR_CHAR:
case wxCURSOR_ARROW:
case wxCURSOR_LEFT_BUTTON: