DP: GetBitmap() added to wxImageList

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Denis Pershin 1998-08-10 18:09:07 +00:00
parent f4e325b3df
commit 40413a5b70
2 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class wxImageList: public wxObject
bool Create(); bool Create();
int GetImageCount() const; int GetImageCount() const;
int Add( const wxBitmap &bitmap ); int Add( const wxBitmap &bitmap );
wxBitmap *GetBitmap(int index);
bool Replace( int index, const wxBitmap &bitmap ); bool Replace( int index, const wxBitmap &bitmap );
bool Remove( int index ); bool Remove( int index );
bool RemoveAll(); bool RemoveAll();

View File

@ -48,6 +48,11 @@ int wxImageList::Add( const wxBitmap &bitmap )
return m_images.Number(); 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 ) bool wxImageList::Replace( int index, const wxBitmap &bitmap )
{ {
wxNode *node = m_images.Nth( index ); wxNode *node = m_images.Nth( index );