git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6456
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
~wxImageList();
bool Create();
int GetImageCount() const;
~wxImageList();
bool Create();
int GetImageCount() const;
- int Add( const wxBitmap &bitmap );
+ int Add( const wxBitmap& bitmap );
+ int Add( const wxBitmap& bitmap, const wxBitmap& mask );
+ int Add( const wxBitmap& bitmap, const wxColour& maskColour );
const wxBitmap *GetBitmap(int index) const;
bool Replace( int index, const wxBitmap &bitmap );
bool Remove( int index );
const wxBitmap *GetBitmap(int index) const;
bool Replace( int index, const wxBitmap &bitmap );
bool Remove( int index );
#include "wx/generic/imaglist.h"
#include "wx/icon.h"
#include "wx/generic/imaglist.h"
#include "wx/icon.h"
//-----------------------------------------------------------------------------
// wxImageList
//-----------------------------------------------------------------------------
// wxImageList
return m_images.Number()-1;
}
return m_images.Number()-1;
}
+int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
+{
+ wxBitmap bmp(bitmap);
+ bmp.SetMask(new wxMask(mask));
+ return Add(bmp);
+}
+
+int wxImageList::Add( const wxBitmap& bitmap, const wxColour& maskColour )
+{
+ wxImage img(bitmap);
+ img.SetMaskColour(maskColour.Red(), maskColour.Green(), maskColour.Blue());
+ return Add(img.ConvertToBitmap());
+}
+
const wxBitmap *wxImageList::GetBitmap( int index ) const
{
wxNode *node = m_images.Nth( index );
const wxBitmap *wxImageList::GetBitmap( int index ) const
{
wxNode *node = m_images.Nth( index );