]> git.saurik.com Git - wxWidgets.git/commitdiff
Make wxImageList not copiable (fixes #10503), replace wxList with wxObjectList
authorRobert Roebling <robert@roebling.de>
Thu, 19 Feb 2009 20:26:00 +0000 (20:26 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 19 Feb 2009 20:26:00 +0000 (20:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/imaglist.h
include/wx/msw/imaglist.h
src/generic/imaglist.cpp

index 4d42a170d151a15db1460a6c7a432f3342021338..1c18dfc9a2b2438580c4d190ebe433c8ec558014 100644 (file)
@@ -49,12 +49,12 @@ public:
     // Internal use only
     const wxBitmap *GetBitmapPtr(int index) const;
 private:
-    wxList  m_images;
+    wxObjectList  m_images;
 
     int     m_width;
     int     m_height;
 
-    DECLARE_DYNAMIC_CLASS(wxGenericImageList)
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList)
 };
 
 #ifndef wxHAS_NATIVE_IMAGELIST
index c76ce168ccb5b7d6736c7a8976a1ea0e11e5e4c0..73fc9df7294f045c09d5a04e4fcee0a91546e3ef 100644 (file)
@@ -199,7 +199,7 @@ public:
 protected:
   WXHIMAGELIST m_hImageList;
 
-  DECLARE_DYNAMIC_CLASS(wxImageList)
+  DECLARE_DYNAMIC_CLASS_NO_COPY(wxImageList)
 };
 
 #endif
index 61fb228a2eed2402c316de07aa64b2a47b38ffcd..87240c8aa2fa1b52fb852a92be336d5f7bbce558 100644 (file)
@@ -120,7 +120,7 @@ int wxGenericImageList::Add( const wxBitmap& bitmap, const wxColour& maskColour
 
 const wxBitmap *wxGenericImageList::GetBitmapPtr( int index ) const
 {
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, NULL, wxT("wrong index in image list") );
 
@@ -153,7 +153,7 @@ wxIcon wxGenericImageList::GetIcon(int index) const
 
 bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
 {
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, false, wxT("wrong index in image list") );
 
@@ -175,7 +175,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
     }
     else
     {
-        wxList::compatibility_iterator next = node->GetNext();
+        wxObjectList::compatibility_iterator next = node->GetNext();
         delete node->GetData();
         m_images.Erase( node );
         m_images.Insert( next, newBitmap );
@@ -186,7 +186,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
 
 bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask )
 {
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, false, wxT("wrong index in image list") );
 
@@ -208,7 +208,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBit
     }
     else
     {
-        wxList::compatibility_iterator next = node->GetNext();
+        wxObjectList::compatibility_iterator next = node->GetNext();
         delete node->GetData();
         m_images.Erase( node );
         m_images.Insert( next, newBitmap );
@@ -222,7 +222,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBit
 
 bool wxGenericImageList::Remove( int index )
 {
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, false, wxT("wrong index in image list") );
 
@@ -234,7 +234,7 @@ bool wxGenericImageList::Remove( int index )
 
 bool wxGenericImageList::RemoveAll()
 {
-    WX_CLEAR_LIST(wxList, m_images);
+    WX_CLEAR_LIST(wxObjectList, m_images);
     m_images.Clear();
 
     return true;
@@ -245,7 +245,7 @@ bool wxGenericImageList::GetSize( int index, int &width, int &height ) const
     width = 0;
     height = 0;
 
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, false, wxT("wrong index in image list") );
 
@@ -259,7 +259,7 @@ bool wxGenericImageList::GetSize( int index, int &width, int &height ) const
 bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y,
                         int flags, bool WXUNUSED(solidBackground) )
 {
-    wxList::compatibility_iterator node = m_images.Item( index );
+    wxObjectList::compatibility_iterator node = m_images.Item( index );
 
     wxCHECK_MSG( node, false, wxT("wrong index in image list") );