-
- wxNode *node = m_images.Nth( index );
- if (node)
- {
- wxBitmap *bm = (wxBitmap*)node->Data();
- width = bm->GetWidth();
- height = bm->GetHeight();
+ newBitmap = new wxBitmap( (const wxIcon&) bitmap );
+#endif
+ else
+ newBitmap = new wxBitmap(bitmap) ;
+
+ if (index == (int) m_images.GetCount() - 1)
+ {
+ m_images.DeleteNode( node );
+ m_images.Append( newBitmap );
+ }
+ else
+ {
+ wxNode *next = node->GetNext();
+ m_images.DeleteNode( node );
+ m_images.Insert( next, newBitmap );
+ }
+
+ return TRUE;
+}
+
+bool wxGenericImageList::Remove( int index )
+{
+ wxNode *node = m_images.Item( index );
+
+ wxCHECK_MSG( node, FALSE, wxT("wrong index in image list") );
+
+ m_images.DeleteNode( node );
+
+ return TRUE;
+}
+
+bool wxGenericImageList::RemoveAll()
+{
+ m_images.Clear();
+