+/*static*/ wxIconBundle wxArtProvider::GetIconBundle(const wxArtID& id, const wxArtClient& client)
+{
+ // safety-check against writing client,id,size instead of id,client,size:
+ wxASSERT_MSG( client.Last() == _T('C'), _T("invalid 'client' parameter") );
+
+ wxCHECK_MSG( sm_providers, wxNullIconBundle, _T("no wxArtProvider exists") );
+
+ wxString hashId = wxArtProviderCache::ConstructHashID(id, client);
+
+ wxIconBundle iconbundle;
+ if ( !sm_cache->GetIconBundle(hashId, &iconbundle) )
+ {
+ for (wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst();
+ node; node = node->GetNext())
+ {
+ iconbundle = node->GetData()->CreateIconBundle(id, client);
+ if ( iconbundle.IsOk() )
+ break;
+ }
+
+ sm_cache->PutIconBundle(hashId, iconbundle);
+ }
+
+ return iconbundle;
+}
+