"""
Resources.py  Various resources needed by the FloatCanvas package

Includes, icons, etc.

"""


### These are some functions for bitmaps of icons.
import wx, cPickle, zlib

def GetHandData():
    return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV72T\x00!\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0O\
\x01\xc8S\xb6t\x06A(\x1f\x0b\xa0\xa9\x8c\x9e\x1e6\x19\xa0\xa8\x1e\x88\xd4C\
\x97\xd1\x83\xe8\x80 \x9c2zh\xa6\xc1\x11X\n\xab\x8c\x02\x8a\x0cD!\x92\x12\
\x98\x8c\x1e\x8a\x8b\xd1d\x14\xf4\x90%\x90LC\xf6\xbf\x1e\xba\xab\x91%\xd0\
\xdc\x86C\x06\xd9m\xe8!\xaa\x87S\x86\x1a1\xa7\x07\x00v\x0f[\x17' ))

def GetHandBitmap():
    return wx.BitmapFromXPMData(GetHandData())

#----------------------------------------------------------------------
def GetPlusData():
    return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV72T\x00!\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0O\
\x01\xc8S\xb6t\x06A(\x1f\x0b RF\x0f\x08\xb0\xc9@D\xe1r\x08\x19\xb8j=l2`\r\
\xe82HF\xe9a\xc8\xe8\xe9A\x9c@\x8a\x0c\x0e\xd3p\xbb\x00\x8f\xab\xe1>\xd5\xd3\
\xc3\x15:P)l!\n\x91\xc2\x1a\xd6`)\xec\xb1\x00\x92\xc2\x11?\xb8e\x88\x8fSt\
\x19=\x00\x82\x16[\xf7' ))

def GetPlusBitmap():
    return wx.BitmapFromXPMData(GetPlusData())

#----------------------------------------------------------------------
def GetMinusData():
    return cPickle.loads(zlib.decompress(
'x\xda\xd3\xc8)0\xe4\nV72T\x00!\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0O\
\x01\xc8S\xb6t\x06A(\x1f\x0b RF\x0f\x08\xb0\xc9@D\xe1r\x08\x19\xb8j=\xa2e\
\x10\x16@\x99\xc82zz\x10\'\x90"\x83\xc34r\xdc\x86\xf0\xa9\x9e\x1e\xae\xd0\
\x81Ja\x0bQ\x88\x14\xd6\xb0\x06Ka\x8f\x05\x90\x14\x8e\xf8\xc1-C|\x9c\xa2\xcb\
\xe8\x01\x00\xed\x0f[\x87' ))

def GetMinusBitmap():
    return wx.BitmapFromXPMData(GetMinusData())

## NOTE: this was created using a newer version of img2py than the above
import cStringIO
def GetPointerData():
    return zlib.decompress(
'x\xda\xeb\x0c\xf0s\xe7\xe5\x92\xe2b``\xe0\xf5\xf4p\t\x02\xd2\xa2 \xcc\xc1\
\x06$W\x8a/\x9d\x06\xa4X\x8a\x9d<C8\x80\xa0\x86#\xa5\x03\xc8\xcf\xf4tq\x0c\
\xa9\x98s\xf4\x92\xa3\x10\x83 \x0f\x8b\xc3\xea?\xa6\xf9\xb3\xae\xaf\x9b\xbcj\
\xef\x9a3-\x13\xba\x99o\xb1\xf07l\xcfYg5\xdbd\xf3\xdf\x0c\x91\xb2\x8b\x1e\
\x81+fM\xf3[u \xe8\xb7N\xcd{\xbf\xfdG\x97\xf0\xaa~}P\xf0\xdb\xd8\xe2\xa9\xdf\
\xec]\x8c\r\xbb\xdb\xbcN9\x08Y\x1d0\\\xb6\xf7\x9f\xd0\xaam\xbe\x0b\xeb\xdb\
\x97\xfc\xbd\xfc8\xe3\x94\xfd\xdb\x7fs\xa4\xa7\x17\xf0\x9d;\x03\xb4\x94\xc1\
\xd3\xd5\xcfe\x9dSB\x13\x00\xcbEE&' )

def GetPointerBitmap():
    return wx.BitmapFromImage(GetPointerImage())

def GetPointerImage():
    stream = cStringIO.StringIO(GetPointerData())
    return wx.ImageFromStream(stream)

