bool wxCursor::CreateFromXpm(const char **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 retval ;
}
+#if wxUSE_IMAGE
+
void wxCursor::CreateFromImage(const wxImage & image)
{
m_refData = new wxCursorRefData;
M_CURSORDATA->m_isColorCursor = true ;
}
+#endif //wxUSE_IMAGE
+
wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
{
m_refData = new wxCursorRefData;
}
else
{
+#if wxUSE_IMAGE
wxImage image ;
image.LoadFile( cursor_file , flags ) ;
if( image.Ok() )
delete m_refData ;
CreateFromImage(image) ;
}
+#endif
}
}