From: Ryan Norton Date: Tue, 1 Mar 2005 10:19:55 +0000 (+0000) Subject: wxUSE_IMAGE cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/476a5decba8e397a83cb4eeb255c7c7b11fcb18e?ds=inline wxUSE_IMAGE cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/cursor.cpp b/src/mac/carbon/cursor.cpp index 8c6d751197..d0f6d1db7e 100644 --- a/src/mac/carbon/cursor.cpp +++ b/src/mac/carbon/cursor.cpp @@ -255,12 +255,16 @@ wxCursor::wxCursor(char **bits) 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 @@ -291,6 +295,8 @@ short GetCTabIndex( CTabHandle colors , RGBColor *col ) return retval ; } +#if wxUSE_IMAGE + void wxCursor::CreateFromImage(const wxImage & image) { m_refData = new wxCursorRefData; @@ -402,6 +408,8 @@ void wxCursor::CreateFromImage(const wxImage & image) M_CURSORDATA->m_isColorCursor = true ; } +#endif //wxUSE_IMAGE + wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) { m_refData = new wxCursorRefData; @@ -438,6 +446,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho } else { +#if wxUSE_IMAGE wxImage image ; image.LoadFile( cursor_file , flags ) ; if( image.Ok() ) @@ -447,6 +456,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho delete m_refData ; CreateFromImage(image) ; } +#endif } }