/////////////////////////////////////////////////////////////////////////////
-// Name: artprov.cpp
+// Name: src/common/artprov.cpp
// Purpose: wxArtProvider class
// Author: Vaclav Slavik
// Modified by:
#pragma hdrstop
#endif
+#include "wx/artprov.h"
+
#ifndef WX_PRECOMP
- #include "wx/log.h"
#include "wx/list.h"
-#endif
-
-#include "wx/artprov.h"
-#include "wx/hashmap.h"
-#include "wx/module.h"
-#if wxUSE_IMAGE
-#include "wx/image.h"
+ #include "wx/log.h"
+ #include "wx/hashmap.h"
+ #include "wx/image.h"
+ #include "wx/module.h"
#endif
// ===========================================================================
wxArtProvidersList *wxArtProvider::sm_providers = NULL;
wxArtProviderCache *wxArtProvider::sm_cache = NULL;
-/*static*/ void wxArtProvider::PushProvider(wxArtProvider *provider)
+/*static*/ void wxArtProvider::CommonAddingProvider()
{
if ( !sm_providers )
{
sm_cache = new wxArtProviderCache;
}
- sm_providers->Insert(provider);
sm_cache->Clear();
}
+/*static*/ void wxArtProvider::PushProvider(wxArtProvider *provider)
+{
+ CommonAddingProvider();
+ sm_providers->Insert(provider);
+}
+
+/*static*/ void wxArtProvider::InsertProvider(wxArtProvider *provider)
+{
+ CommonAddingProvider();
+ sm_providers->Append(provider);
+}
+
/*static*/ bool wxArtProvider::PopProvider()
{
wxCHECK_MSG( sm_providers, false, _T("no wxArtProvider exists") );
bmp = node->GetData()->CreateBitmap(id, client, size);
if ( bmp.Ok() )
{
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
if ( size != wxDefaultSize &&
(bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) )
{
else if (client == wxART_BUTTON)
return wxSize(16, 15);
else // wxART_OTHER or perhaps a user's client, no specified size
- return wxDefaultSize;
+ return wxDefaultSize;
#endif // GTK+ 2/else
}