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:
@@ -515,6 +515,19 @@ wxBitmap::wxBitmap(GdkPixmap* pixmap)
|
||||
}
|
||||
#endif
|
||||
|
||||
wxBitmap::wxBitmap(const wxCursor& cursor)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(2,8,0)
|
||||
if (gtk_check_version(2,8,0) == NULL)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gdk_cursor_get_image(cursor.GetCursor());
|
||||
*this = wxBitmap(pixbuf);
|
||||
}
|
||||
#else
|
||||
wxUnusedVar(cursor);
|
||||
#endif
|
||||
}
|
||||
|
||||
wxBitmap::~wxBitmap()
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user