X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cae3d5e60bff8ab4c8cffe0530f21a8090f1a45f..3a9becbd5439254a77e7dbc0278d80117a397264:/wxPython/src/msw/_misc.py diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 8e67e39ace..c932576310 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -2647,6 +2647,7 @@ ART_COPY = cvar.ART_COPY ART_CUT = cvar.ART_CUT ART_PASTE = cvar.ART_PASTE ART_DELETE = cvar.ART_DELETE +ART_NEW = cvar.ART_NEW ART_UNDO = cvar.ART_UNDO ART_REDO = cvar.ART_REDO ART_QUIT = cvar.ART_QUIT @@ -5270,6 +5271,18 @@ class DropSourcePtr(DropSource): self.__class__ = DropSource _misc_.DropSource_swigregister(DropSourcePtr) +def DROP_ICON(filename): + """ + Returns either a `wx.Cursor` or `wx.Icon` created from the image file + ``filename``. This function is useful with the `wx.DropSource` class + which, depending on platform accepts either a icon or a cursor. + """ + img = wx.Image(filename) + if wx.Platform == '__WXGTK__': + return wx.IconFromBitmap(wx.BitmapFromImage(img)) + else: + return wx.CursorFromImage(img) + class DropTarget(object): """Proxy of C++ DropTarget class""" def __repr__(self):