#include "wx/generic/imaglist.h"
#include "wx/icon.h"
+#include "wx/image.h"
//-----------------------------------------------------------------------------
// wxImageList
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 );
//so construct it from a bitmap object until I can figure this nonsense out. (DW)
newBitmap = new wxBitmap(bitmap) ;
#else
- newBitmap = new wxIcon( (const wxIcon&) bitmap );
+ newBitmap = new wxBitmap( (const wxIcon&) bitmap );
#endif
else
newBitmap = new wxBitmap(bitmap) ;