diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index a6c24d9c06..3de0323615 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -84,6 +84,9 @@ public: wxImage ConvertToImage() const; + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + wxMask *GetMask() const; void SetMask( wxMask *mask ); diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index a6c24d9c06..3de0323615 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -84,6 +84,9 @@ public: wxImage ConvertToImage() const; + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + wxMask *GetMask() const; void SetMask( wxMask *mask ); diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 30fa4db6fa..e104eb7e82 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -865,6 +865,12 @@ void wxBitmap::SetMask( wxMask *mask ) M_BMPDATA->m_mask = mask; } +bool wxBitmap::CopyFromIcon(const wxIcon& icon) +{ + *this = icon; + return TRUE; +} + wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const { wxCHECK_MSG( Ok() && diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 30fa4db6fa..e104eb7e82 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -865,6 +865,12 @@ void wxBitmap::SetMask( wxMask *mask ) M_BMPDATA->m_mask = mask; } +bool wxBitmap::CopyFromIcon(const wxIcon& icon) +{ + *this = icon; + return TRUE; +} + wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const { wxCHECK_MSG( Ok() &&