# Path: wh.py
# def GetBitmap(name, module=None):
#   """
#   wx.Bitmap GetBitmap(bmpName, module=None)
#   
#   Get a bitmap from a file, possibly prepending the module's path
#   """
#   name=modPath(name, module)
# 
#   for ext in ["png"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       with wx.LogNull():
#         return wx.Bitmap(fn)
# 
#   for ext in ["xpm"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       data=[]
#       f=open(fn)
#       for line in f:
#         if line.startswith('"'):
#           data.append(line[1:line.rfind('"')])
#       f.close()
#       return wx.BitmapFromXPMData(data)
# 
#   for ext in ["ico"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       return wx.BitmapFromIcon(wx.Icon(fn))
#   return None


import wx.lib.ogl as wxOgl
import math
import wx
from wh import GetBitmap
    self.usedShapes=0
    self.upperShape=None
    self.description=str
    self.condition=""
    self.detail=""
    self.SetBitmap(GetBitmap(bmpname, self))

    if tokenNo < 0:
      self.label=str
    else:
      strList=str.split(' ')
      self.label = strList[tokenNo]
      if detailNo < 0:
        self.description = str
          
#      if detailNo > 0:
#        self.description=(self.description + " ".join(strList[0:detailNo])).lstrip()
#        self.detail=strList[detailNo]

  def __str__(self):
    return "%s(%d) %d" % (self.label, self.level, self.totalShapes)
  
  def GetLevel(self):
    return self.level
  
  def GetAverageCost(self):
    return (self.costHigh - self.costLow) / 2 + self.costLow
  
    
  def OnDraw(self, dc):

# Path: wh.py
# def GetBitmap(name, module=None):
#   """
#   wx.Bitmap GetBitmap(bmpName, module=None)
#   
#   Get a bitmap from a file, possibly prepending the module's path
#   """
#   name=modPath(name, module)
# 
#   for ext in ["png"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       with wx.LogNull():
#         return wx.Bitmap(fn)
# 
#   for ext in ["xpm"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       data=[]
#       f=open(fn)
#       for line in f:
#         if line.startswith('"'):
#           data.append(line[1:line.rfind('"')])
#       f.close()
#       return wx.BitmapFromXPMData(data)
# 
#   for ext in ["ico"]:
#     fn="%s.%s" % (name, ext)
#     if os.path.exists(fn):
#       return wx.BitmapFromIcon(wx.Icon(fn))
#   return None


# Path: modPg/_explain.py
import wx.lib.ogl as wxOgl
import math
import wx
from wh import GetBitmap

    self.usedShapes=0
    self.upperShape=None
    self.description=str
    self.condition=""
    self.detail=""
    self.SetBitmap(GetBitmap(bmpname, self))

    if tokenNo < 0:
      self.label=str
    else:
      strList=str.split(' ')
      self.label = strList[tokenNo]
      if detailNo < 0:
        self.description = str
          
#      if detailNo > 0:
#        self.description=(self.description + " ".join(strList[0:detailNo])).lstrip()
#        self.detail=strList[detailNo]

  def __str__(self):
    return "%s(%d) %d" % (self.label, self.level, self.totalShapes)
  
  def GetLevel(self):
    return self.level
  
  def GetAverageCost(self):
    return (self.costHigh - self.costLow) / 2 + self.costLow
  
    
  def OnDraw(self, dc):

    bmp=self.GetBitmap()