# 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
      append(p1x+offs,         p0y+width)
      append(p0x,              p0y+width)

      dc.DrawPolygon(points, 0, 0)
 
      
class ExplainCanvas(wxOgl.ShapeCanvas):
  def __init__(self, parent):
    wxOgl.ShapeCanvas.__init__(self, parent)
    self.SetDiagram(wxOgl.Diagram())
    self.GetDiagram().SetCanvas(self)
    self.SetBackgroundColour(wx.WHITE)
    self.lastShape=None
    self.Bind(wx.EVT_MOTION, self.OnMouseMove)

  def SetEmpty(self):
    self.GetDiagram().DeleteAllShapes()
    self.lastShape=None
    self.result=[]

  def GetResult(self):
    return self.result

  def SetData(self, rowset):
    self.SetEmpty()
    last=None
    maxLevel=0
    
    while rowset.HasMore():
      tmp=rowset.Next()[0]

# 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

      append(p1x+offs,         p0y+width)
      append(p0x,              p0y+width)

      dc.DrawPolygon(points, 0, 0)
 
      
class ExplainCanvas(wxOgl.ShapeCanvas):
  def __init__(self, parent):
    wxOgl.ShapeCanvas.__init__(self, parent)
    self.SetDiagram(wxOgl.Diagram())
    self.GetDiagram().SetCanvas(self)
    self.SetBackgroundColour(wx.WHITE)
    self.lastShape=None
    self.Bind(wx.EVT_MOTION, self.OnMouseMove)

  def SetEmpty(self):
    self.GetDiagram().DeleteAllShapes()
    self.lastShape=None
    self.result=[]

  def GetResult(self):
    return self.result

  def SetData(self, rowset):
    self.SetEmpty()
    last=None
    maxLevel=0
    
    while rowset.HasMore():
      tmp=rowset.Next()[0]

      self.result.append(tmp)