]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/cursor.cpp
wxUSE_IMAGE cleanup
[wxWidgets.git] / src / mac / carbon / cursor.cpp
index 8c6d75119728520f69277d94a6f219b282ce79b4..d0f6d1db7e8bcaea6077aabe655c7ea4c9cf6742 100644 (file)
@@ -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
     }
 }