Add wxBitmap ctor from wxCursor to wxGTK and wxMSW.

Allow converting wxCursor to wxBitmap in order to draw it, for example.

Closes #15699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-04 19:44:52 +00:00
parent 23e431f0b6
commit 118e8e7286
5 changed files with 37 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ public:
CopyFromIcon(icon, transp);
}
// Convert from wxCursor
wxEXPLICIT wxBitmap(const wxCursor& cursor)
{
(void)CopyFromCursor(cursor, wxBitmapTransparency_Auto);
}
wxBitmap& operator=(const wxIcon& icon)
{
(void)CopyFromIcon(icon);