wxArtProvider::GetIconBundle() cleanup:

* makes GetIcon() and GetBitmap() behave in the same way again (i.e. GetBitmap
  falls back to CreateIconBundle too)
* GetIcon() used to call CreateIconBundle() first, before CreateBitmap() - this
  doesn't make sense, inverted
* GetIconBundle() falls back to GetIcon() if provider's CreateIconBundle()
  doesn't return anything and vice versa: GetIcon()/GetBitmap() falls back to
  GetIconBundle() if CreateBitmap() doesn't return anything


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-03-29 21:23:59 +00:00
parent cee875e329
commit b5c2a33438
3 changed files with 57 additions and 44 deletions

View File

@@ -205,7 +205,10 @@ protected:
// only once per instance's lifetime for each requested wxArtID.
virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
const wxArtClient& WXUNUSED(client),
const wxSize& WXUNUSED(size)) { return wxNullBitmap; }
const wxSize& WXUNUSED(size))
{
return wxNullBitmap;
}
virtual wxIconBundle CreateIconBundle(const wxArtID& WXUNUSED(id),
const wxArtClient& WXUNUSED(client))
@@ -215,6 +218,8 @@ protected:
private:
static void CommonAddingProvider();
static wxIconBundle DoGetIconBundle(const wxArtID& id,
const wxArtClient& client);
private:
// list of providers: