2011-11-07 02:01:30 +00:00
|
|
|
import wx, os, math
|
2011-11-07 13:17:00 +00:00
|
|
|
from bufferedcanvas import *
|
2011-11-07 02:01:30 +00:00
|
|
|
|
2011-11-07 19:04:45 +00:00
|
|
|
from xybuttons import XYButtons
|
|
|
|
from zbuttons import ZButtons
|
2011-11-07 02:01:30 +00:00
|
|
|
|
|
|
|
class MyFrame(wx.Frame):
|
|
|
|
def __init__(self, parent, id, title):
|
|
|
|
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(800, 600))
|
2011-11-07 18:50:17 +00:00
|
|
|
sizer = wx.BoxSizer()
|
2011-11-07 19:04:45 +00:00
|
|
|
self.xy = XYButtons(self, moveCallback=self.moveXY)
|
2011-11-07 18:50:17 +00:00
|
|
|
sizer.Add(self.xy)
|
2011-11-07 19:04:45 +00:00
|
|
|
self.z = ZButtons(self, moveCallback=self.moveZ)
|
2011-11-07 18:50:17 +00:00
|
|
|
sizer.Add(self.z)
|
|
|
|
|
|
|
|
self.SetSizer(sizer)
|
2011-11-07 19:04:45 +00:00
|
|
|
|
|
|
|
def moveXY(self, x, y):
|
|
|
|
print "got x", x, 'y', y
|
|
|
|
|
|
|
|
def moveZ(self, z):
|
|
|
|
print "got z", z
|
2011-11-07 02:01:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MyApp(wx.App):
|
|
|
|
def OnInit(self):
|
|
|
|
frame = MyFrame(None, -1, 'test.py')
|
|
|
|
frame.Show(True)
|
|
|
|
frame.Centre()
|
|
|
|
return True
|
|
|
|
|
|
|
|
app = MyApp(0)
|
|
|
|
app.MainLoop()
|