diff --git a/wxPython/wxPython/tools/XRCed/encode_bitmaps.py b/wxPython/wxPython/tools/XRCed/encode_bitmaps.py new file mode 100644 index 0000000000..56660d3c65 --- /dev/null +++ b/wxPython/wxPython/tools/XRCed/encode_bitmaps.py @@ -0,0 +1,27 @@ + +import sys, os, glob +from wxPython.tools import img2py + +output = 'images.py' + +# get the list of PNG files +files = glob.glob('src-images/*.png') + +# Truncate the inages module +open(output, 'w') + +# call img2py on each file +for file in files: + + # extract the basename to be used as the image name + name = os.path.splitext(os.path.basename(file))[0] + + # encode it + if file == files[0]: + cmd = "-u -i -n %s %s %s" % (name, file, output) + else: + cmd = "-a -u -i -n %s %s %s" % (name, file, output) + img2py.main(cmd.split()) + + + diff --git a/wxPython/wxPython/tools/XRCed/images.py b/wxPython/wxPython/tools/XRCed/images.py index 924c55d463..a002960a1e 100644 --- a/wxPython/wxPython/tools/XRCed/images.py +++ b/wxPython/wxPython/tools/XRCed/images.py @@ -1,368 +1,602 @@ #---------------------------------------------------------------------- -# This file was generated by img2py.py +# This file was generated by encode_bitmaps.py # -from wxPython.wx import wxBitmapFromXPMData, wxImageFromBitmap -import cPickle, zlib +from wxPython.wx import wxImageFromStream, wxBitmapFromImage +from wxPython.wx import wxEmptyIcon +import cStringIO -def getIconData(): - return cPickle.loads(zlib.decompress( -'x\xda\x9d\x90\xbb\x0e\xc20\x0cEw\xbe\xc2\x12C\x91"Y-\xa2\x82\xd1\x80\xd45C\ -\x97\xac\x88\x11\xa4\xf0\xff\x13\xd7Nh\xa0\xcd\x00\xb8y\xf4\xe6\xf8\x95l\xee\ -\x8fn56\xdb\x1da\xec\xa9kV\x97\xb1\tt\xa5\xd3\xfdr\xbd\x99b\xa8\xf5\xf1\xa0\ -\x9fi\xa7\xba\x85\rI\xcb\x8bg\x1dU\xf7m\xbf\xeb[\xd3\xfe\xa53\'\xd5\xc3a8O\ -\xban_@\x0eL10\x07X\xc4iL[\x8e\x8c\x81 \xe1\xc3\xea\x17\xd4/NPct\x85{0N\xcc\ -\xa5f\xb4\x83\x94\xd6|\xde\x1b\xb2"\x9a\x16\x05\xe6\x10\x81\x08\xe5\x9cZ\x1d\ -K\xcd\xd4\xed\x04-}\xb9\n\n\x12\xdb\xb0\x99\x0e\xe8\x8f\x17\xf2N~\x81\xe2}"^\ -\x16\xd0;\x18\xce\x9c\xcb?oP\x9c\xc7t\xf0\xb1\xfd\x13Z&,9z\x0eS:\x04/\x1bB:\ -\x81Q\x15jM4Z\xaf\x99\xba\xf4\xf5n\xed\x9e\x92\xef)B\x7f\xbem\x81\xfc\x04\ -\x8f\xd5\x99\xcc' )) +def getAutoRefreshData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xf3IDATx\x9c\xb5\x94\xad\x16\xc30\x08\x85\xc9\xceD$\xb2\x8fX\x19Y\x89\ +\xacD\xee\x11\'+\xe76\xb3\xb6\x94AB\xbb\x13\\\x7fr\xbf\xc0\x05\x12"B\xcf\xb8\ +uU\x07\x80{\xf4\xc7\xe7\xb2\xbc\xf5\xbb\x011\xb5\xce\x852\x90\xe2\x0f\xe6*4\ +\x0cX\x0f[\xe2\xf2\xe6-H5\x03K\x9c\x88\x92\x86\x10\x91\x0b\t{0\x96\x12\xaa\ +\xb9\x8e\xe4\xb5\xa9\x97\xbaW\x1e\x0f\x1e\x06Hs\x89(-\xd3\xf1;g\xde\xcaw\n\ +\xa0\x85\x01\x00Vq\xce\x0cc)\x90g\x1f\xe2z0 \xa6\xd5<}\x08\xe7\xfd[+\xdc\x0c\ +Z\xa1K\x04`gpiU\xc8\x12\xbd\xa6\xfa\xbf\xddwQs\xd0j\x93Z^\xbb\xc1\x97\x00\ +\x12$\x9fq>\xf6\x19\xfd\x9b\x08\x1e\xad\xb3\x97\x00\x00\x00\x00IEND\xaeB\ +`\x82' -def getIconBitmap(): - return wxBitmapFromXPMData(getIconData()) +def getAutoRefreshBitmap(): + return wxBitmapFromImage(getAutoRefreshImage()) -def getIconImage(): - return wxImageFromBitmap(getIconBitmap()) +def getAutoRefreshImage(): + stream = cStringIO.StringIO(getAutoRefreshData()) + return wxImageFromStream(stream) -#---------------------------------------------------------------------- -def getNewData(): - return cPickle.loads(zlib.decompress( -"x\xda\xd3\xc8)0\xe4\nV72Q02V0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\ -\x81\x9d0\xbdX$A\xf2\ -\xf9\xc3Z\x12\x010%\x15\xf2\x11` S\x82\x1e\x00-\xd9\x8b\xfa" )) - -def getNewBitmap(): - return wxBitmapFromXPMData(getNewData()) - -def getNewImage(): - return wxImageFromBitmap(getNewBitmap()) - -#---------------------------------------------------------------------- -def getOpenData(): - return cPickle.loads(zlib.decompress( -'x\xda\xcd\x92\xb1\n\xc3 \x10\x86\xf7<\xc5A\x07\x0b\x81#IK\xb1\xab\x01\xc7:d\ -\xb95\x84N\r\xbd\xbe\xff\xd4hb\xb5j\xbb\xb6\xbf\x08~|\xde)\xe2~~\xb4\xd5 \ -\xba#t\x078A+\xaaq\x10\x08\x13\xa8y\x9cn\x8e\xccB\xbbsc\x87c\xb2\xac\xa5\xee\ -\x9b\x95a\xe1\x0b\xdf\xaf\x0e\xd8K-\x1d\xd7\x96\x95Tas9\x7f"\x11\xf1\xa3D7\ -\xf1K[Leh\xe7\x97A"1\xe1\x9a\xfcB\xc8\xb4\r4\xb9\xf4\x8eJ\x92C\xdf\xf2\x99\ -\xb5\x8f\xab\x8e+9v\x89\xa4\xd4\xc52so\xf2\x95\xcd\xc5/dB~\xfb\x13\xf0\t\x81\ -T\x87G' )) - -def getOpenBitmap(): - return wxBitmapFromXPMData(getOpenData()) - -def getOpenImage(): - return wxImageFromBitmap(getOpenBitmap()) - -#---------------------------------------------------------------------- -def getSaveData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV72Q02V0U0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xfc\ -\x81\xc5\x81C\x9c\x8e\xb4*\xc4\xd5BF3t\xc9\ -Z\x8a\x93\xc5\xf3\xfd\'\xef.vP\xee\xe6\xfe\t\x81\x9f/\xdf\r!\xc7\xf5\xddwS\ -\x18\xce0\x9c\xe0\x02}\xe8\xe6) ,p[\xe7\xe5\xa9\x8d\xb8\x1d"\'E\xedE\xfa5\ -\xca\xd2\x0e\xdc\xef\xf4zh\xa9\x02s\xcacN_hg_\x88\x1a\x0fV\xce/\xfd\x87\x15\ -\x1d\x88\xbcIc\x9b\x95\xf4 \xcbDl\xb0\x92c\xf2\xf0m\xb2i\xca\xa5\xe2\x98(r1\ -\x1e\xc11\xa1H\x1c\xb3\xc53\x1b\xdcb\xc16\\\xb2\xdfO\xc0\x0f5t\x92\x06' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xc8IDATx\x9c\xed\x95;\x0b\xc30\x0c\x84\xe5\xe2\xc1\xe3\xfd\xd4\x8c\x195\ +v\xccO\xd5\xa8\xc1\x90\x0e!!\x0fI\xe4Q\x0f\x85\x1e\x08\x8c\x06}\xdc\xd9\xc2\ +\t\x00\xb5\xd4\xab\xe9\xf4?\xe0\x8c\xb2\xd5\x14\x91\xd1\xea\x03HW\x01\xae\ +\x03\xad\xba\xa9\x08|\x0b\xe0A\xafB\x92\xb5\x07"2jU*\xb9,\x83\xa73\x9bC\x80\ +\xc1\x8d.\x04\xecU\xf2\x9b\xb4\xf6\x87^\x04\t#*\xb9l\xca\x93\xd6\x9eD:3\xba\ +\x10`]\xf4\x1a\xbcwaAn9X\x03\xb5\xf6K\x11\x111\xf3\x06\xf2\xc8\xc1\x99\xf8\ +\xccE\x9b\x87\x1c\xc5\x0b\xf8\xacL\x00\x80\xb4\xb7JD\xd4u\xe2\xc2=\xa8\xeb\ +\x80\x99\x8dg7]\xe2c\x07\x91\xe6\x17\xd3\x04\x00\x0cft\x91\xccM\xfe\xa6~\xff\ +\xc3i\x0e\xf8\x00\xb4\xedw\x96)\x01f=\x00\x00\x00\x00IEND\xaeB`\x82' def getCopyBitmap(): - return wxBitmapFromXPMData(getCopyData()) + return wxBitmapFromImage(getCopyImage()) def getCopyImage(): - return wxImageFromBitmap(getCopyBitmap()) + stream = cStringIO.StringIO(getCopyData()) + return wxImageFromStream(stream) + +def getCopyIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getCopyBitmap()) + return icon + +#---------------------------------------------------------------------- +def getCutData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xb6IDATx\x9c\xcd\x94\xd1\r\xc4 \x0cC\xcdM\xe0Q3BF`\xd4l\xd0\xfbi\xee*\ +\xd4@@B\xc2R\xff\x1a\xbf\xe2\x98\x16\x92\xd8\xa9\xcfV\xf7c\x00fvm\x05\x00\ +\x80\xaa\xbeBF\xf04@DB\xf3\x08\x9e\x06\x90,\xad\x91\x9b\xd7Z\xbb\xb3%[S7$YZs\ +U-\xd1\xdct\x8b\xda8z\xe6S\x00\x8f\xc9w1\x8af\x1a\xf0\xa6\xd1\xd7\x03S;\x90;\ +\x1a\xbd\x1f\x80\xacC\xc0\xf4\t\x9e\xd1\x98\xc9\xf5\x07/\x02z&\xb5\xf2\xf7\ +\xce\x12\xc0\x07\xdd\xa8\xa7\xe8\xb2\x9d\xf1\xb3k\xe5\xcb\x151\x00\xfd\x13\ +\x0e[\xf4\xcc\xd7\x8d\xbc\x9e\xcfX\xa2\xca\xa6j\x9a1\x8a\x94\xbe\x07\xab:s\ +\xc9G\x01\xbe\xd4=_\xff?J\x99`\x00\x00\x00\x00IEND\xaeB`\x82' + +def getCutBitmap(): + return wxBitmapFromImage(getCutImage()) + +def getCutImage(): + stream = cStringIO.StringIO(getCutData()) + return wxImageFromStream(stream) + +def getCutIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getCutBitmap()) + return icon + +#---------------------------------------------------------------------- +def getIconData(): + 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\x025ID\ +ATx\x9c\xedV\xd1\x91\xe3 \x0c}{\xb3e\x98>L!J\x1fK\xea\x08\xe9C\x14\x02}h\xfb\ +\xd0}8\xc2\x80\x1d\'\x97\x9b\x9d\xfc\xec\x9ba\x1c\x88\x90\x1f\xd2\x93\xf0\ +\x87\xaa*\xde\x88?\xef|9\x00|\x02@)\x051F\x00@\x8c\x11\xd34\x01\x00\xce\xe73\ +D\x04!\x04\xcc\xf3\x8c\xeb\xf5\x8a\x9c\xf3\xc6\x89\xf7\x1eDT\xf7\x19F{"\x02\ +\x11\xf5\x9b\xf5\x06\xef\xbd\x02\xd0\x10\x82\xaa\xaa\xc6\x18\x15\x806&JDum\ +\x1cD\xa4-\x9cs\xbbv\xe6\xdfP\xbd\xe7\x9c\x15\x80:\xe74\xe7\\\x1d\xe4\x9c7\ +\x04\x98\xb9\xae\x89\xc8\x86\xa8\x91\'\xa2\xba\xdf\xfc\x8f>\xd7]M\x14\xec9\ +\x9ej\x8f\xc0M\xc4\xbb\x91\x1a\xedl\xbd\xf5\xdb\x11hO32m\x1d\x84\x10\x94\x99\ +\x95\x99\xbb5UUf\xde\x10:\xc2\xc6\xaa\xcd\xdd\x88#\r\x88\xc8K\x04\xba2,\xa5@\ +D\xea<\xa5\xb4Q<\x00\x84\x10\xc0\xcc`fx\xef\xab\xe2_B\x1b\xfe6\xf7&\xc8\xbd\ +\x08\xb4\xb9\xb5\x13\xb7y5\xbb\x18c\xb7\x7fO[5\x02)%\xe4\x9cAD`f8\xe7 "8\x9d\ +N\xff|(\xab\xf5\x94\x12J)\x00\x96\xe8ZO`\xe6>\x02{e\xd7\x96\x8d\xe5\xf7(\x02\ +\xde\xfb\xee\xb4!\x84]\xad\x8c\x95\xf1\t\x009g\xcc\xf3\\\x07\x00\xcc\xf3\x8c\ +\x10\x02D\xa4F\xc6\xf2\xed\x9c\xab\x07\xb0.8\xe2r\xb9`\x9a\xa6\x87\x9d\xf0C\ +\xf5\xf72\xfa9|\x7f\x03\x96\x81\x9d,\xfd<\x81\x9c\x01+\xa2{\x89~{\n\xdeN\xe0\ +\xa9\x14\xa4\x04\x94\x02X\x97\xf6~\x19\xb7\x8a\x05\xb0\xe4\xfbz]m\x9c\xeb\ +\xff\xbf\x8bG\x97E\xce\xaaK\x06\xfb1ti\rak\xe3\xfd\xfa\xfb\x1e\x1e\x12h\x9d1\ +/\xc3\xd6\xac\xa5\xb7k!,\xf3\x91\xd0K\x04\xcc\xb1sK$\x0cD\xabc\xe6u>t\xe3\ +\xa7"\xf0\x94\x06D\x96\x9c?\xc2\xd7\xd7v\xbe\xf3\r\xdb\xe1)\x02G\x82j\xae\ +\x85\x97\xf0\x14\x81i\x02b\\\x9e\xc0Z\x11#\xb1R\xfa\x8ew\xbb\x89\x8fq\xa4\ +\x01\x91^\\\x06\xe7z\x11\xc6\xb8\xda\x99V\xc6\xea\xb9\x87\x87U\xb0W^\xa3S\ +\x91^p-\xe9\xff&\xa0\xba(\xbd}\xc1\xf0M\xb1Kb,\xd9{\xf8\xfd\x1ex;\x81\xbf\ +\x12\x81S\xa3\xdc\xfd\r-\x00\x00\x00\x00IEND\xaeB`\x82' + +def getIconBitmap(): + return wxBitmapFromImage(getIconImage()) + +def getIconImage(): + stream = cStringIO.StringIO(getIconData()) + return wxImageFromStream(stream) + +def getIconIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getIconBitmap()) + return icon + +#---------------------------------------------------------------------- +def getNewData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00uIDATx\x9c\xed\xd5\xbb\n\xc0 \x0c\x05\xd0\x9b\xe2\x90\xf1~\xb2\x9f\x9c1\ +\x83`\xa7v\xf2EEJ\xa9\x01\x17\x03\x1e\x0c\x89\nI\xac\x8cc\xe9\xe9\x1b\x18\ +\x89\xd0J\x9aYn\xe5I\xca\x14\x00\x00\x9e\xbc\xb8\xafAaf\xb9\x87L\x95\xc8\x93\ +wo9\x05hP\x00\xedR>\x06<\xf9\xbd\x00 \xc6XD\xbe\xdf\xa6\x1b\xf8\x01\xd0}*\ +\xaeaZ\x02\x90\x94\xda\x00\x8d\x86\xec/\xf3u\xe0\x04ND$:\xe8\xc5\xf5\x91\x00\ +\x00\x00\x00IEND\xaeB`\x82' + +def getNewBitmap(): + return wxBitmapFromImage(getNewImage()) + +def getNewImage(): + stream = cStringIO.StringIO(getNewData()) + return wxImageFromStream(stream) + +def getNewIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getNewBitmap()) + return icon + +#---------------------------------------------------------------------- +def getOpenData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xc9IDATx\x9c\xed\x951\x0e\xc3 \x0cE?U\x07F\x1f\xaaC\x8f\xe5#p\x9c\x0e=\ +\x94G\x06$:\xa4T\x84\x04C\x11\x0c\x95\xfa\xa5\x88("\xefa;R\x0c\x11ae.K\xe9\ +\x7fAO\xae\xa3/\x8aHL\xf7Ddj\xfb\x86*\x10\x91HD&]I\x96KS\xcc\xac\xcf4\xc1\ +\xcbj\xaa-\xeamA\xb9\xb7\xcci\x05"\x12}\x00\x00\x0f\xc0\xc2*\x93j\xc9\x95\ +\x19lp\xc0\xc3\x07\xc0\x87\xe3\n\x00\xcc\\=}C`w\x92\xf3\xb5\x1d\xa5E{\x98\ +\xd6\xa6<\xddC.\xe1\x8fg\x1b~\xbfm-c\xe6\x8f\xa41\x03|\x05w\xce\x1d\x9e\xab\ +\x15\x8c\xc0\xf3\xd3\x03J\x053\xe0\x802\xe46z\x8b\x06\xaf\n\xde/tKjpU0+\xbf\ +\xff\xc3Y.x\x01\xfcgd\xb8c~\xd8\x9d\x00\x00\x00\x00IEND\xaeB`\x82' + +def getOpenBitmap(): + return wxBitmapFromImage(getOpenImage()) + +def getOpenImage(): + stream = cStringIO.StringIO(getOpenData()) + return wxImageFromStream(stream) + +def getOpenIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getOpenBitmap()) + return icon #---------------------------------------------------------------------- def getPasteData(): - return cPickle.loads(zlib.decompress( -'x\xda\xcd\x92\xb1\n\x830\x10\x86w\x9f\xe2\xa0\x83\x85\xc0\x11m\xa1\xe9\x16Z\ -p\xec\r.YE:U\x9a\xbe\xff\xe4]48x\xe9V\xe8\'\xc2\xfd|\xf7g\x88\x1e\xa7OS\xf5u\ -{\x86\xf6\x04\x17h\xeaj\xe8k\x84\x11n\xd30\xbeR2\x9c\x0e\x96q6e\x92|\xb5\xf2\ -\xa4\x1c$w\xae\xbb\xdb%G\xc9\xce\xba\xbc\x0f\x9c\x1f\xf1\xfdL\xc1\xe7\xe5\ -\xce\xadR\xe7\x0f$2\xaa\x14\x81!\xe0\xb6\xb0I\x8c1"\xab\x90\x86\xbd\xe4\x9e \ -\x13\xed\xe5\x8a*7ti\x16\n\xd2\x0b\xc6|\x93\xde\xe8\x92\x0f\x95\x97\x8aM\xee\ -R\xa9)]R\xae\xaf\xd0\x04 \xc6dH\xfbd\x94\xf9\xe9\x9f\x803\xb0L\x99\x05' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xcfIDATx\x9c\xed\x95\xb1\x0e\xc3 \x0cD\x8f\x8a\x81\xd1\x9f\x9a\xb1\xa3G\ +>\xd7#\x03\x12\x1d*R\x02\xa6A$\x0c\x95zR\x14@p\x0f0\x18CDX\xa9\xc7R\xf7?`Dv\ +\xb4\xa3\x88\xa4\xb2NDfd\x9c\xe9\x9d\xa2\xda\x10\x00B|\xff\x9d2\xad\x1eP]\ +\x81\x88$f\xde\xeb\xcc\x8c\x10?\xc6\xb9\\\xf5I\x1a\xe44\x06\xd9<\x1b\x97\xe5\ +\x12\x90!C+\xa8\xa5m\xc9\xa8N\x87\xd6\xb3\xbc\x1dp\x84-\x06\x00@\x88\xcf\xa6\ +\xcdY\x0f@\xa7_\xd8\xdd\x16\xec\xacG}\xea\xa7n\xb2\xb3~\xff\xca6\xa0=IS+\xa8\ +\xb7)\xd7K\xe0%\x80f\xa4\xc5\xa6\x0b "\xa3]\x9a\x1c\xc8\x9e\xd90\xa0\x07\xd9\ +6Qg?\x05\x00\x00f>\xe4\x16"=\x1d|S7\x9b\xde\xa5\xdf\x7f\xd1^\xf7\xdbLY\x05\ +\x8av\xd9\x00\x00\x00\x00IEND\xaeB`\x82' def getPasteBitmap(): - return wxBitmapFromXPMData(getPasteData()) + return wxBitmapFromImage(getPasteImage()) def getPasteImage(): - return wxImageFromBitmap(getPasteBitmap()) + stream = cStringIO.StringIO(getPasteData()) + return wxImageFromStream(stream) -#---------------------------------------------------------------------- -def getTestData(): - return cPickle.loads(zlib.decompress( -'x\xda\x95\xd2=\x0b\xc20\x10\x06\xe0\xbd\xbf\xe2\xc0\xa1N\xa1\x1f\n\xba*t\ -\xf4\x86.\xb7\x96\xe2d\xf1\xfc\xff\x93\xb9$\xcd5M\xa9xY\xf2\xf2\x10r$w\x9c>u\ -\xd1\x97\xcd\t\x9a\x16\xceP\x97\xc5\xd0\x97\x06F\xb8M\xc3\xf8r\x89l:\xb4\x95\ -,\x97Q\xf2\xb5\x92\xe52K\xee.\xdd\xbd\xf2\x19l~\xf0\xfb\x19\xc2v\xfd\x81Fj\ -\x1b\xcd\\9\x12\xd1\x8cD+$f\x0efw\xb4\x8b\xb8D\xb1\xa0nG\xbb\x88\x8a\xde,r@w\ -4A\x07\x8b\xa3\x01\xb5\x95\xd8V\x86Fm\x03M\xb4\x05\xaaF\xcb1\xb9R_h\xd5\x10f\ -\xc8\x1c\x15\xd3_\x89&\x8a+\x04$\xff\x14D\xe8-\x9d\x04\xcb\xa4\x94\xcd\x10\ -\xa2\xd2\xef\x013_\xba\x1d\xa3N' )) - -def getTestBitmap(): - return wxBitmapFromXPMData(getTestData()) - -def getTestImage(): - return wxImageFromBitmap(getTestBitmap()) +def getPasteIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getPasteBitmap()) + return icon #---------------------------------------------------------------------- def getRefreshData(): - return cPickle.loads(zlib.decompress( -'x\xda\xad\xd2\xbb\x0e\xc20\x0c\x05\xd0\xbd_q%\x860]\xf5\xc1\x00?\xc0\xc8\ -\xd2\xc5+Bl\xa8\xed\xffO\xcd\xab\xa9\x01\x17\t\x81\xb3\xc4:\x8a\x15;\xd9?\ -\xa6\xa6\xea]{@\xdb\xa1C\xe3\xaak\xef\x047\xecNuX1\x87\xcf/\xe3p\x8f\t\x03\ -\x9e\x8f\xb5\x8f\x8cv|\x83\x0c\xb1\x81^D\xa9BF\x13\xac\xaa1Y\xd8\x88\x89\xc4\ -\'d\xdal\x94\xd5u\x9f0\x91\x89\xc8d\xa3j\xf7\x9f\xb8t@\x1bY\xae\xfd^6\x9f\ -\xb0&\xb4\x1c\xa5\x8dQY\xaa\x9a\x8f]\x86\xf1\xda\x8a\x88\x14\xc3O\x1f\x8c3\ -\x1dNw\xdd' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\xcaIDATx\x9c\xc5\x94\xc1\x11\x84 \x0cE\x93\x1d\x0b\xc8\xd1\x12=RBJ\xc8\ +\x91\x12=\xd2\x81{\x91\x19\xcc\x12\x082\xcc\xfe\x9b"\xff\xc17\t\x12\x11\xac\ +\xd4g\xa9;\x00l\xde\x0f\xcf\x94.\xfdn\'\xc2\xde>\xd7\rJ\xf3(\xd2\x84\xba\x01\ +ys\xcd\xbc\xaf\x94HD\xef\x97\ -\xc5g\xe4\x98\xdfB\xe6\xcb\xcf\xed8\x82\x1c\xa3\x83APi\x85\x9c\x0c\xf4\xd7\ -\x1a\xb3\xc5\r\x9a\xc8\xb4\x87\x9c7\x9d\xb2 \t\x01\x8b\x91\x82\x81U\xebV\x00\ -\xfd\xb4PC\xb6\xba\x16;ew1w \xed\xb2\xbc)DLY\x1dM\xea\t\x16u@\xe8\\\x19\x95\ -\xf1w.\xbb\x98i\x05z\xdc\xe17d\x90\x7f\x95\x07\x86\x9f' )) +def getSaveData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00\x86IDATx\x9c\xed\x95\xb1\n\xc0 \x0cD\xb588\xde\'\xdf\';:\x14\xdaA\x04\ +\xa9\x1a\xdb\xa2\x14\xa5\x07"\x04\xb9\xa7IT\r@\x8d\xd46\xd4}\t\x80)\x05\x9ds\ +\xc7\x1b3\x00\xfa\x1a\xab\x9e\x80\x0c\xb3\xdf\xbd8\xd2\xb5$\xb3\x8duIQ\x04\ +\x944\x07@\xd2\xfc\x80b\x9bF\x91JYcE\x03)\xffM\xc0\x1d\x83\x96\xba\x00\x86tQ\ +z\xd1$-\xdaE\x004)?xiwI5\xa8\x169@\xf2\xc7\xeb\xa9\xf4\xffe~\x0e8\x01v84H\ +\x1c6\xc2\x8f\x00\x00\x00\x00IEND\xaeB`\x82' -def getAutoRefreshBitmap(): - return wxBitmapFromXPMData(getAutoRefreshData()) +def getSaveBitmap(): + return wxBitmapFromImage(getSaveImage()) -def getAutoRefreshImage(): - return wxImageFromBitmap(getAutoRefreshBitmap()) +def getSaveImage(): + stream = cStringIO.StringIO(getSaveData()) + return wxImageFromStream(stream) + +def getSaveIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getSaveBitmap()) + return icon + +#---------------------------------------------------------------------- +def getTestData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x17\x08\x06\ +\x00\x00\x00\x11!\x8f-\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x01\x15IDATx\x9c\xb5U\xbb\x11\x830\x0c\x95s)Rj\x04\x8f@A\xc18\x8c\xa2\x11\ +\x18\x81qR\xa4\xf0\x08\x8c@I\xc1\x9d\xd3`\xb0\x85l\x8b\x1cQ\x83\x11\xf2\xfbH\ +\x06\x0c"\xc2?\xe3\xf1Wt\x00xj\x8a\xe6y\xf6<\x87\x88F\xb3\xd7\x94Z$\x01_%\ +\x12\x1dXkw`\xe7\\\x91 \xd4N\xd3$\x12\x9d\x1cXk\xfd\xfbs\x80\xbe\nM\\\xd6c\ +\xdd\xb5\x8dHr\xeb\x90\x89\xe8\xd4\xd2\xc4\x01W\x1fBr\x11\xab\x0f!\xb9\xb8\ +\xfd\x98r\x17\xbb\x83\x9cz\x80\xc3\xc1\xb2\xa6k)\xb8\x8b\xaa\x03\x0e\x18\xae\ +\xa5\xe1\xc7.\xf62\xe7\\v\x13W\x1b\x9c\xc8\xf5i\x17T3\xe0@%\xf5<\xd4C\x0e\ +\xa0W\xc0\x13\x02\xcd\xb7E\x03>\x0cCr\xaf\xd6\x13\xcf\xa1FDD\xf2)\xca\xb9\ +\x90\x86,\x05W\x7f"\xd0\x80\xd7\xf2\xb1z\x91 v\x91\x03\x91\x9eK\xea\x0123@DC\ +D\xbekG\x00\x00\x90\xde\xf0\xaem6\xe0~\xcfq\xf5\x00\x95\x1f\xce\xb6\xc9\x8f\ +\xe3x\xca\xf7}\x19XM\x10\x13\t\xb9\xea\xd1V\x13\xfc\x1a_\xfc\x89l\x9f\xd7k\ +\x04?\x00\x00\x00\x00IEND\xaeB`\x82' + +def getTestBitmap(): + return wxBitmapFromImage(getTestImage()) + +def getTestImage(): + stream = cStringIO.StringIO(getTestData()) + return wxImageFromStream(stream) + +def getTestIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTestBitmap()) + return icon #---------------------------------------------------------------------- def getTreeDefaultData(): - return cPickle.loads(zlib.decompress( -"x\xda\xd3\xc8)0\xe4\nV74S04Q0U0T\xe7J\x0cV\x8fPHVp\xcaIL\xce\x06\xf3\xfc\ -\x81\ -\x88\xefb\xe0b\xe2\x02S\x8c\n\xc8\x10\xd4\x83\x80\x08T\xc1|\x10\xf0\xa7\xae\ -\xa0?\x18\xa0\nF@\x01\x99\x8e'FP\x0f\x00\xdc\x1bL7" )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\ +\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00QIDATx\x9cc\x14\x10\x10`\xa0\x040Q\xa4\x9b\x1a\x06\xb0\xa0\x0b\xbcx\xf3\ +\xe2?.\xc5\x1c,\x1c\x0c\x02\x02\x02\x8cx\r````\xb8q\xe3\x06\x86\xd8\x81\x03\ +\x07\xb0\x1a:\xf0a@\xfd@d`\xc0\xed_\xa2\x0c\xe0`\xe1 \xc9\x05\x8cC?%Rl\x00\ +\x00\xdc\x00\x0b\x9f\x8dZU\xfe\x00\x00\x00\x00IEND\xaeB`\x82' def getTreeDefaultBitmap(): - return wxBitmapFromXPMData(getTreeDefaultData()) + return wxBitmapFromImage(getTreeDefaultImage()) def getTreeDefaultImage(): - return wxImageFromBitmap(getTreeDefaultBitmap()) + stream = cStringIO.StringIO(getTreeDefaultData()) + return wxImageFromStream(stream) -#---------------------------------------------------------------------- -def getTreeRootData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S04Q0V0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3"\x801\x82\xf9`@\ -\xc8LLo\xea\x01\x00\xb5\x9cde' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00IIDATx\x9ccd``\xf8\xcf@\x01`\x81P?\xc8\xd4\xce\xc1\xc0D\x89\xed\x0c\ +\x0c\x0c\x94\x1b\xc0\xc8@\x8d0\xb8p\xe5\x02Y\x9a\rt\x0c\x06A\x18\x8c$\x03\ +\x0e\x1c8@\x1b\x17\xb0\x90b\x1b\xd1\x06888\x10m\x00\xc5I\x19\x00\xe6)\x0cc\ +\xbf\x9c\xcc\xa1\x00\x00\x00\x00IEND\xaeB`\x82' def getTreeDialogBitmap(): - return wxBitmapFromXPMData(getTreeDialogData()) + return wxBitmapFromImage(getTreeDialogImage()) def getTreeDialogImage(): - return wxImageFromBitmap(getTreeDialogBitmap()) + stream = cStringIO.StringIO(getTreeDialogData()) + return wxImageFromStream(stream) + +def getTreeDialogIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeDialogBitmap()) + return icon #---------------------------------------------------------------------- def getTreeFrameData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u\x05\x85d\x05\xa7\x9c\xc4\ -\xe4l0O\x0f\xc8S6\x00\x027\x0b0?\x02\xc4w1p1q1\x80\xaaF\x05\x10A=\x14@\xb2 V\ -3#P\xc0p\x10\xc4\xf4\xa6\x1e\x00\xe3\x8f`,' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00:IDATx\x9ccd``\xf8\xcf@\x01`\x81P?\xc8\xd4\xce\xc1\xc0D\x89\xed\x0c\ +\x0c\x0c\x94\x1b\xc0\xc8@\x8d0\xb8p\xe5\x02Y\x9a\rt\x0c\x06A\x18\x8c\x1a0,\ +\x0c\xa08)\x03\x00\x90c\x07\x1f\xb3yvF\x00\x00\x00\x00IEND\xaeB`\x82' def getTreeFrameBitmap(): - return wxBitmapFromXPMData(getTreeFrameData()) + return wxBitmapFromImage(getTreeFrameImage()) def getTreeFrameImage(): - return wxImageFromBitmap(getTreeFrameBitmap()) + stream = cStringIO.StringIO(getTreeFrameData()) + return wxImageFromStream(stream) -#---------------------------------------------------------------------- -def getTreeMenuBarData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\ -\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\ -\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\xa8\x80\x1a\x82z\xa8 \x02"\ -\x98\x8f\x0c\xfca\x82\xfe \x00#I\x17\xc4b\xa6?*\x80\x08F\xa0\x01\x1a\xf9]\ -\x0f\x00\x9b\xde`\xb2' )) - -def getTreeMenuBarBitmap(): - return wxBitmapFromXPMData(getTreeMenuBarData()) - -def getTreeMenuBarImage(): - return wxImageFromBitmap(getTreeMenuBarBitmap()) - -#---------------------------------------------------------------------- -def getTreeToolBarData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"\x0b\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\ -\xc4\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x1d@|7\x0b7g\x03\x08_\x19\xc4\ -70\x80\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f\xa6\xd8\xcd\x02\xcc\xd7\x86\xf0\r\x0c\ -\xa0\x8a\xf3A|\x17\x03\x17\x13\x17\x98fT@\rA=T\x10\x01\x11\xccG\x06\xfe0Am\ -\xed\x88|\x07\x87\x88|e\xe5\x08\x02\x82\x11\x11\x11p\xec\x8f\xc7L\x7fT\x00\ -\x11\x8c@\x034\xf2\xbb\x1e\x00\x1c\x05j\x12' )) - -def getTreeToolBarBitmap(): - return wxBitmapFromXPMData(getTreeToolBarData()) - -def getTreeToolBarImage(): - return wxImageFromBitmap(getTreeToolBarBitmap()) +def getTreeFrameIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeFrameBitmap()) + return icon #---------------------------------------------------------------------- def getTreeMenuData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\ -\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\ -\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\nzp\x10\xa1\xa0\x00\x17\xcc\ -\x87\x02\x7f\x14A\x7f0 [p(\x9b\xe9\x0f\x03H\x82\x11\x08\x00\x16\xd4\x03\x00&\ -sj\xf9' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00]IDATx\x9cc\x14\x10\x10`\x80\x81\x17o^\xfcg \x02p\xb0p0\x08\x08\x080\ +2000\xb0\xa0K\xde\xb8q\x03\xaf\xe6\x03\x07\x0e\xa0\xf01\x0c\xc0\xa6\x08\x06\ +\x1c\x1c\x1c0\xc4\x98\xf0ZG\x04\xa0\xd8\x00\xac^\xc0\xe6T\x92\x0c\x18\r\x83\ +\xd10\xc0\xe5\x7f\xa2\x0c\xe0`\xe1 I3\x03\x03\x03\x03\x00l\xa5\x16\xbeals=\ +\x00\x00\x00\x00IEND\xaeB`\x82' def getTreeMenuBitmap(): - return wxBitmapFromXPMData(getTreeMenuData()) + return wxBitmapFromImage(getTreeMenuImage()) def getTreeMenuImage(): - return wxImageFromBitmap(getTreeMenuBitmap()) + stream = cStringIO.StringIO(getTreeMenuData()) + return wxImageFromStream(stream) + +def getTreeMenuIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeMenuBitmap()) + return icon #---------------------------------------------------------------------- -def getTreeSizerHData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ -\x01\xc8\xf7\xcb\xcfK\x85rP\x01\xa9\x82z\xa8\x00*\x08Q\x01\xa3\x06\xaf 6\xc7\ -S\x12 z\x00\xf8\xc9>T' )) +def getTreeMenuBarData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00bIDATx\x9cc\x14\x10\x10`\xa0\x040Q\xa4{P\x18\xc0\xf8\xe3\xcf\x8f\xff\ +\xe4j\xe6`\xe1``a```\xb8q\xe3\x06\xc9\x9a\x0f\x1c8\xc0\xc0\xc0\xc0\x001\x00Y\ +\x00\x19888\xe0\x14\x87\x81\x81\x0fD\xb8\x17\x90\x9d\x85\x0cp\x89\xc3\r\x981\ +c\x06E.`d`` ;\x1a\x19\x18\x18\x18\x18G\xf3\x02\x03\x00DO\x13\x93\xa7\xebQk\ +\x00\x00\x00\x00IEND\xaeB`\x82' -def getTreeSizerHBitmap(): - return wxBitmapFromXPMData(getTreeSizerHData()) +def getTreeMenuBarBitmap(): + return wxBitmapFromImage(getTreeMenuBarImage()) -def getTreeSizerHImage(): - return wxImageFromBitmap(getTreeSizerHBitmap()) +def getTreeMenuBarImage(): + stream = cStringIO.StringIO(getTreeMenuBarData()) + return wxImageFromStream(stream) + +def getTreeMenuBarIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeMenuBarBitmap()) + return icon #---------------------------------------------------------------------- -def getTreeSizerVData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ -\x01\xc8\xf7\xcb\xcfK\x85r\x14\x14\xf4`\x00\xc8F\x08*@\xc0\x00\t\x0e\x11\'!\ -\x03\xa0\xa0\x1e\x00\xfaC>*' )) +def getTreePanelData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\ +\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00CIDATx\x9c\xed\xd31\x0e\x800\x0cC\xd1W\x94\xa1\xf7?Q\x8e\x91\xa3t@\x82\t\ +1\x131\xf6\xef\xfe^\xec\xb1\xceui2c\n\xa8\xaa\xcf\xe1\xcc\x04G\xb7\xfda\x0b\ +\xb6\xe0\x17A\xf0\xce\xb2\xc3@\xfbLp\x03\xeer\x0c%l\xbc\t6\x00\x00\x00\x00IE\ +ND\xaeB`\x82' -def getTreeSizerVBitmap(): - return wxBitmapFromXPMData(getTreeSizerVData()) +def getTreePanelBitmap(): + return wxBitmapFromImage(getTreePanelImage()) -def getTreeSizerVImage(): - return wxImageFromBitmap(getTreeSizerVBitmap()) +def getTreePanelImage(): + stream = cStringIO.StringIO(getTreePanelData()) + return wxImageFromStream(stream) + +def getTreePanelIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreePanelBitmap()) + return icon #---------------------------------------------------------------------- -def getTreeStaticBoxSizerHData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\ -/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x15\xc0\x05\xf5\xb0\x08\ -\xea!\x8bB\x04#\x14\xf4\xf4\xf4\x14"`\x00.\x08R\x19\x01Q\x08\x17\x84\xf0\x06\ -\x93 *\xc0\x1f \xc4\x08\xea\x01\x00\x0b\xa9Jm' )) +def getTreeRootData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\ +\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\ +\x00aIDATx\x9c\xed\x93\xcb\r\xc00\x08C\xa1\xea\x00\x1e\x83\xfd\xa7a\x0c6Ho\ +\x88"\x88\x1aq\xado|l\xf1"\x85\x01\xd0Dw\xd54\xb3\x15k\x00\xdc\x06\x88\xc8kY\ +U\xdb\xe5J\x0c\x80Dd\x9d\x1a\xfd\x82n\x901\xa2"\x92\x07D\x94\x93k< \x9bv\x0f\ +W\x06d\xfd\x08\xdf\x11x\xfa\x17\xae\x91\x9b\x88\x1e\xba\x12*2\xab=\t\xe9\x00\ +\x00\x00\x00IEND\xaeB`\x82' -def getTreeStaticBoxSizerHBitmap(): - return wxBitmapFromXPMData(getTreeStaticBoxSizerHData()) +def getTreeRootBitmap(): + return wxBitmapFromImage(getTreeRootImage()) -def getTreeStaticBoxSizerHImage(): - return wxImageFromBitmap(getTreeStaticBoxSizerHBitmap()) +def getTreeRootImage(): + stream = cStringIO.StringIO(getTreeRootData()) + return wxImageFromStream(stream) -#---------------------------------------------------------------------- -def getTreeStaticBoxSizerVData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\ -/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x0c\xf4\xa0\xb4\x02\x92\ -\xa0\x1e\\\x14.\x18\xa1\xa0\xa7\xa7\xa7\x10\x11\x11\x81&\x08V\x89&\x08\x01\ -\xb4\x17\x84\x81\xc1`\xbb\x1e\x00U+IU' )) - -def getTreeStaticBoxSizerVBitmap(): - return wxBitmapFromXPMData(getTreeStaticBoxSizerVData()) - -def getTreeStaticBoxSizerVImage(): - return wxImageFromBitmap(getTreeStaticBoxSizerVBitmap()) - -#---------------------------------------------------------------------- -def getTreeSizerGridData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ -\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x0c`\x14\xbd\x05\x87\x88\x93\xd0\ -\x00PP\x0f\x00!\xb1?\xce' )) - -def getTreeSizerGridBitmap(): - return wxBitmapFromXPMData(getTreeSizerGridData()) - -def getTreeSizerGridImage(): - return wxImageFromBitmap(getTreeSizerGridBitmap()) +def getTreeRootIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeRootBitmap()) + return icon #---------------------------------------------------------------------- def getTreeSizerFlexGridData(): - return cPickle.loads(zlib.decompress( -'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ -\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x08\xc0\x04\x98A\x1dA\xbaYD/\xc7\ -\xa3\x01\xa0\xa0\x1e\x00>\x91?\xce' )) + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00BIDATx\x9cc\x14\x10\x10`\x08\x08\t\xf8\xcf@&`\x8116\xac\xd9\xc0\x88,\ +\x11\x10\x12\xf0\x1f]\x0c\x1d\x04\x84\x04\xfcg"\xd7f\x18\x18x\x03\x18G\x03q\ +\xd4\x00j\x18@qBb\x14\x10\x10\xa0\xc8\x05\x00\xb4+\x16\xba\x9e\xe7\x8fF\x00\ +\x00\x00\x00IEND\xaeB`\x82' def getTreeSizerFlexGridBitmap(): - return wxBitmapFromXPMData(getTreeSizerFlexGridData()) + return wxBitmapFromImage(getTreeSizerFlexGridImage()) def getTreeSizerFlexGridImage(): - return wxImageFromBitmap(getTreeSizerFlexGridBitmap()) + stream = cStringIO.StringIO(getTreeSizerFlexGridData()) + return wxImageFromStream(stream) + +def getTreeSizerFlexGridIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeSizerFlexGridBitmap()) + return icon + +#---------------------------------------------------------------------- +def getTreeSizerGridData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x003\x07\x9f\xe6\ +\x0f\xecU,\xb4IS\xe8\xa5s\x11\x16\x1c\x16\x91\x01\xd0\x0e\xad\x06\xee\x1e\ +\x8f\x05\xee\x1e\x00xE\xd2\x89\x88D%l\x18\xd7\x06\xa2r+\xea5\xc8\rl\x18gyET\ +\xa2\xd5\xe5|\xf8\xf0_@@\x80\x11\xa7\x02\x06\ +\x06\x06&B\x9a?|\xf8\xf0\x9f$\x03\x02B\x02\xe0\x1a\x905\x07\x84\x04\xfc\x87a\ +\xa2\\\xc0\xc0\xc0\xc0\x80\xec\xfc\rk60nX\xb3\x01\xc3;8\r\x80i&;\x0c\x88\x05\ +\xc3\xc0\x00\x16l\x82\xe8QE\xb2\x01\xd8\xa2\x0b\x97\xe1\x03\x1f\x06\x03o\x00\ +\xc5\xb1\x00\x00\xf1\xda$S0&0\x03\x00\x00\x00\x00IEND\xaeB`\x82' + +def getTreeStaticBoxSizerVBitmap(): + return wxBitmapFromImage(getTreeStaticBoxSizerVImage()) + +def getTreeStaticBoxSizerVImage(): + stream = cStringIO.StringIO(getTreeStaticBoxSizerVData()) + return wxImageFromStream(stream) + +def getTreeStaticBoxSizerVIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeStaticBoxSizerVBitmap()) + return icon + +#---------------------------------------------------------------------- +def getTreeToolBarData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ +\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\ +\x00\x00yIDATx\x9c\xed\x93;\x0e\x80 \x10D\x1f\x86\x82\x92cPXp\\\x8e\xc3\x11(\ +,8\x8a\x85\x89\x16 1&\xf8\x81\xc6\xc2\xe9\x1e0\x93\t\x9b\x15Zkz4t\xb9?\x11 \ +\xe6e^[\xcdJ*$@\x8c\xf1\xb5\xd9{\x0f\x90\x02\x00\xcchS*\x10\xa6\x801\x99eb\ +\x9b\x99\xcc\xbb\xba\xff\xa04P\xa7\x0b%k/+\xc7\xc7ZO\xb8\x048\xe7nJ^K\x00\ +\xcdc\x04\x10\xff.\xb0\x01@\x9a\x1c\x89X\xd8\x00\xb4\x00\x00\x00\x00IEND\xae\ +B`\x82' + +def getTreeToolBarBitmap(): + return wxBitmapFromImage(getTreeToolBarImage()) + +def getTreeToolBarImage(): + stream = cStringIO.StringIO(getTreeToolBarData()) + return wxImageFromStream(stream) + +def getTreeToolBarIcon(): + icon = wxEmptyIcon() + icon.CopyFromBitmap(getTreeToolBarBitmap()) + return icon diff --git a/wxPython/wxPython/tools/XRCed/src-images/AutoRefresh.png b/wxPython/wxPython/tools/XRCed/src-images/AutoRefresh.png new file mode 100644 index 0000000000..d957081d6e Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/AutoRefresh.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Copy.png b/wxPython/wxPython/tools/XRCed/src-images/Copy.png new file mode 100644 index 0000000000..9771d6d216 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Copy.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Cut.png b/wxPython/wxPython/tools/XRCed/src-images/Cut.png new file mode 100644 index 0000000000..58d86ce0bd Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Cut.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Icon.png b/wxPython/wxPython/tools/XRCed/src-images/Icon.png new file mode 100644 index 0000000000..c6eda50401 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Icon.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/New.png b/wxPython/wxPython/tools/XRCed/src-images/New.png new file mode 100644 index 0000000000..571af0f44c Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/New.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Open.png b/wxPython/wxPython/tools/XRCed/src-images/Open.png new file mode 100644 index 0000000000..9cced6acf2 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Open.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Paste.png b/wxPython/wxPython/tools/XRCed/src-images/Paste.png new file mode 100644 index 0000000000..5dac646f5a Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Paste.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Refresh.png b/wxPython/wxPython/tools/XRCed/src-images/Refresh.png new file mode 100644 index 0000000000..8180432feb Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Refresh.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Save.png b/wxPython/wxPython/tools/XRCed/src-images/Save.png new file mode 100644 index 0000000000..d5c686eef4 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Save.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/Test.png b/wxPython/wxPython/tools/XRCed/src-images/Test.png new file mode 100644 index 0000000000..c6e7816f4a Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/Test.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeDefault.png b/wxPython/wxPython/tools/XRCed/src-images/TreeDefault.png new file mode 100644 index 0000000000..479a4ca2e2 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeDefault.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeDialog.png b/wxPython/wxPython/tools/XRCed/src-images/TreeDialog.png new file mode 100644 index 0000000000..af63e84555 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeDialog.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeFrame.png b/wxPython/wxPython/tools/XRCed/src-images/TreeFrame.png new file mode 100644 index 0000000000..87c7d4d93e Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeFrame.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeMenu.png b/wxPython/wxPython/tools/XRCed/src-images/TreeMenu.png new file mode 100644 index 0000000000..b081f7b1d4 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeMenu.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeMenuBar.png b/wxPython/wxPython/tools/XRCed/src-images/TreeMenuBar.png new file mode 100644 index 0000000000..c2938a0019 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeMenuBar.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreePanel.png b/wxPython/wxPython/tools/XRCed/src-images/TreePanel.png new file mode 100644 index 0000000000..5e059e5f91 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreePanel.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeRoot.png b/wxPython/wxPython/tools/XRCed/src-images/TreeRoot.png new file mode 100644 index 0000000000..ea5cf2e074 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeRoot.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeSizerFlexGrid.png b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerFlexGrid.png new file mode 100644 index 0000000000..c29ce68d1d Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerFlexGrid.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeSizerGrid.png b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerGrid.png new file mode 100644 index 0000000000..c56ba9a4ca Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerGrid.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeSizerH.png b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerH.png new file mode 100644 index 0000000000..b51e6f59ab Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerH.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeSizerV.png b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerV.png new file mode 100644 index 0000000000..295f1be910 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeSizerV.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerH.png b/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerH.png new file mode 100644 index 0000000000..1ebbbeb6c8 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerH.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerV.png b/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerV.png new file mode 100644 index 0000000000..805c87bbc0 Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeStaticBoxSizerV.png differ diff --git a/wxPython/wxPython/tools/XRCed/src-images/TreeToolBar.png b/wxPython/wxPython/tools/XRCed/src-images/TreeToolBar.png new file mode 100644 index 0000000000..bae7ec3efc Binary files /dev/null and b/wxPython/wxPython/tools/XRCed/src-images/TreeToolBar.png differ diff --git a/wxPython/wxPython/tools/XRCed/xrced.py b/wxPython/wxPython/tools/XRCed/xrced.py index 8b17d8baa8..6b5aa998e4 100644 --- a/wxPython/wxPython/tools/XRCed/xrced.py +++ b/wxPython/wxPython/tools/XRCed/xrced.py @@ -14,10 +14,7 @@ import images # Constants -# Return code from wxGetOsVersion -wxGTK = 9 - -if wxGetOsVersion()[0] == wxGTK: +if wxPlatform == '__WXGTK__': labelFont = wxFont(12, wxDEFAULT, wxNORMAL, wxBOLD) modernFont = wxFont(12, wxMODERN, wxNORMAL, wxNORMAL) else: @@ -428,7 +425,7 @@ class XML_Tree(wxTreeCtrl): self.SetBackgroundColour(wxColour(224, 248, 224)) EVT_TREE_SEL_CHANGED(self, self.GetId(), self.OnSelChanged) # One works on Linux, another on Windows - if wxGetOsVersion()[0] == wxGTK: + if wxPlatform == '__WXGTK__': EVT_TREE_ITEM_ACTIVATED(self, self.GetId(), self.OnItemActivated) else: EVT_LEFT_DCLICK(self, self.OnDClick) @@ -440,20 +437,20 @@ class XML_Tree(wxTreeCtrl): self.dom = None # Create image list il = wxImageList(16, 16, true) - self.rootImage = il.AddIcon(wxIconFromXPMData(images.getTreeRootData())) - xxxObject.image = il.AddIcon(wxIconFromXPMData(images.getTreeDefaultData())) - xxxPanel.image = il.AddIcon(wxIconFromXPMData(images.getTreePanelData())) - xxxDialog.image = il.AddIcon(wxIconFromXPMData(images.getTreeDialogData())) - xxxFrame.image = il.AddIcon(wxIconFromXPMData(images.getTreeFrameData())) - xxxMenuBar.image = il.AddIcon(wxIconFromXPMData(images.getTreeMenuBarData())) - xxxToolBar.image = il.AddIcon(wxIconFromXPMData(images.getTreeToolBarData())) - xxxMenu.image = il.AddIcon(wxIconFromXPMData(images.getTreeMenuData())) - xxxSizer.imageH = il.AddIcon(wxIconFromXPMData(images.getTreeSizerHData())) - xxxSizer.imageV = il.AddIcon(wxIconFromXPMData(images.getTreeSizerVData())) - xxxStaticBoxSizer.imageH = il.AddIcon(wxIconFromXPMData(images.getTreeStaticBoxSizerHData())) - xxxStaticBoxSizer.imageV = il.AddIcon(wxIconFromXPMData(images.getTreeStaticBoxSizerVData())) - xxxGridSizer.image = il.AddIcon(wxIconFromXPMData(images.getTreeSizerGridData())) - xxxFlexGridSizer.image = il.AddIcon(wxIconFromXPMData(images.getTreeSizerFlexGridData())) + self.rootImage = il.AddIcon(images.getTreeRootIcon()) + xxxObject.image = il.AddIcon(images.getTreeDefaultIcon()) + xxxPanel.image = il.AddIcon(images.getTreePanelIcon()) + xxxDialog.image = il.AddIcon(images.getTreeDialogIcon()) + xxxFrame.image = il.AddIcon(images.getTreeFrameIcon()) + xxxMenuBar.image = il.AddIcon(images.getTreeMenuBarIcon()) + xxxToolBar.image = il.AddIcon(images.getTreeToolBarIcon()) + xxxMenu.image = il.AddIcon(images.getTreeMenuIcon()) + xxxSizer.imageH = il.AddIcon(images.getTreeSizerHIcon()) + xxxSizer.imageV = il.AddIcon(images.getTreeSizerVIcon()) + xxxStaticBoxSizer.imageH = il.AddIcon(images.getTreeStaticBoxSizerHIcon()) + xxxStaticBoxSizer.imageV = il.AddIcon(images.getTreeStaticBoxSizerVIcon()) + xxxGridSizer.image = il.AddIcon(images.getTreeSizerGridIcon()) + xxxFlexGridSizer.image = il.AddIcon(images.getTreeSizerFlexGridIcon()) self.il = il self.SetImageList(il) @@ -1013,9 +1010,7 @@ class Frame(wxFrame): frame = self wxFrame.__init__(self, None, -1, '', pos, size) self.CreateStatusBar() - icon = wxEmptyIcon() - icon.CopyFromBitmap(images.getIconBitmap()) - self.SetIcon(icon) + self.SetIcon(images.getIconIcon()) # Idle flag self.inIdle = false @@ -1091,7 +1086,7 @@ class Frame(wxFrame): 'Refresh', 'Refresh view') tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(), 'Auto-refresh', 'Toggle auto-refresh mode', true) - if wxGetOsVersion()[0] == wxGTK: + if wxPlatform == '__WXGTK__': tb.AddSeparator() # otherwise auto-refresh sticks in status line tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh) tb.Realize()