From db0aec831d38f2937e6a595d9fa40c84e6499fdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 23 Sep 2001 22:36:17 +0000 Subject: [PATCH] added wxBitmap::CopyFromIcon to wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/bitmap.h | 3 +++ include/wx/gtk1/bitmap.h | 3 +++ src/gtk/bitmap.cpp | 6 ++++++ src/gtk1/bitmap.cpp | 6 ++++++ 4 files changed, 18 insertions(+) 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() && -- 2.45.2