From 40413a5b7072c33464d55fe7d457e7f5791633a3 Mon Sep 17 00:00:00 2001 From: Denis Pershin Date: Mon, 10 Aug 1998 18:09:07 +0000 Subject: [PATCH] DP: GetBitmap() added to wxImageList git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/imaglist.h | 1 + src/generic/imaglist.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h index 72ce155305..d13864cbbf 100644 --- a/include/wx/generic/imaglist.h +++ b/include/wx/generic/imaglist.h @@ -59,6 +59,7 @@ class wxImageList: public wxObject bool Create(); int GetImageCount() const; int Add( const wxBitmap &bitmap ); + wxBitmap *GetBitmap(int index); bool Replace( int index, const wxBitmap &bitmap ); bool Remove( int index ); bool RemoveAll(); diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 61819c387a..1629c414d9 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -48,6 +48,11 @@ int wxImageList::Add( const wxBitmap &bitmap ) return m_images.Number(); }; +wxBitmap *wxImageList::GetBitmap(int index) { + wxNode *node = m_images.Nth( index ); + return (wxBitmap*)node->Data(); +} + bool wxImageList::Replace( int index, const wxBitmap &bitmap ) { wxNode *node = m_images.Nth( index ); -- 2.45.2