X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b9a4190f70909de9568f45389e7aa3ecbc66b8a..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/wx/py/images.py diff --git a/wxPython/wx/py/images.py b/wxPython/wx/py/images.py index a2d731d298..4eba169368 100644 --- a/wxPython/wx/py/images.py +++ b/wxPython/wx/py/images.py @@ -1,8 +1,72 @@ +"""Support for icons.""" -"""Renamer stub: provides a way to drop the wx prefix from wxPython objects.""" +__author__ = "Patrick K. O'Brien " +__cvsid__ = "$Id$" +__revision__ = "$Revision$"[11:-2] -from wx import _rename -from wxPython.py import images -_rename(globals(), images.__dict__, modulename='py.images') -del images -del _rename +import wx +import cStringIO + + +def getPyIcon(): + icon = wx.EmptyIcon() + icon.CopyFromBitmap(getPyBitmap()) + return icon + +def getPyBitmap(): + return wx.BitmapFromImage(getPyImage()) + +def getPyImage(): + stream = cStringIO.StringIO(getPyData()) + return wx.ImageFromStream(stream) + +def getPyData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\ +\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x04\ +\x95IDATx\x9c\xed\x97?lSG\x1c\xc7?\x97\x98\xd8Q\xa3\xdeY\xa2j\x06\xa4\xf7"QJ\ +\xbb<3@\x01\xa9\xc2\x0c\xa8!\x1d\x1c6\xcaB\xa8D[uI2\xf4\x8f\xe8\x103\xb4\xa2\ +,5\x0b\x03\x032C\xab\xc0\x92dh:t\xc0)*E\xcd@Y\x1c#\x97\xddCUk\xf4B\x8d3\x9f\x8d\x9a\x9bU%\xe2~b\xab\xdf\x82\ +\x83N+\xd3\xe92\\\x1f\xcf\x93\xdd\x9f\xa1\xaa5\x95\xf9\n\xe7\xf3y\xe2\x10[V\ +\x82H\xe6\xd3G\x1dN\xf7\xc3\xa7\xc7a\xc0\x83\xc3\xc7\xf3\xcc\x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