Commit 8246ef2e authored by Jeremy Kajikawa's avatar Jeremy Kajikawa

Started with Event Bindings and Empty procedures for those bindings,

 still need to correct the EVT_ codes for the bindings...
parent 02f76339
...@@ -17,6 +17,7 @@ try: ...@@ -17,6 +17,7 @@ try:
def __init__(self): def __init__(self):
wx.Frame.__init__(self, None, title="Weaver") wx.Frame.__init__(self, None, title="Weaver")
# Menus and Items
self.menustrip = wx.MenuBar() self.menustrip = wx.MenuBar()
m = wx.Menu() m = wx.Menu()
self.Bind(wx.EVT_MENU, self.OnLoadOpts, m.Append(wx.ID_ANY,"&Load Options"," Load Configuration Settings")) self.Bind(wx.EVT_MENU, self.OnLoadOpts, m.Append(wx.ID_ANY,"&Load Options"," Load Configuration Settings"))
...@@ -34,6 +35,7 @@ try: ...@@ -34,6 +35,7 @@ try:
self.menustrip.Append(m,"&Help") self.menustrip.Append(m,"&Help")
self.SetMenuBar(self.menustrip) self.SetMenuBar(self.menustrip)
# Displayed Layout Follows
self.vlayout = wx.BoxSizer(wx.VERTICAL) self.vlayout = wx.BoxSizer(wx.VERTICAL)
hbox = wx.BoxSizer(wx.HORIZONTAL) hbox = wx.BoxSizer(wx.HORIZONTAL)
hbox.Add(wx.StaticText(self, -1, "Device :", style=wx.ALIGN_CENTRE), 0, wx.ALL, 1) hbox.Add(wx.StaticText(self, -1, "Device :", style=wx.ALIGN_CENTRE), 0, wx.ALL, 1)
...@@ -92,20 +94,27 @@ try: ...@@ -92,20 +94,27 @@ try:
self.hlayout.Add(vbox, 1, wx.ALL, 1) self.hlayout.Add(vbox, 1, wx.ALL, 1)
self.vlayout.Add(self.hlayout, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 1) self.vlayout.Add(self.hlayout, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 1)
self.CreateStatusBar()
# Need to correct EVT_ codes for button types
self.Bind(wx.EVT_BUTTON, self.OnSerialPort, self.SerialPort)
self.Bind(wx.EVT_BUTTON, self.OnSerialSpeed, self.SerialPort)
self.Bind(wx.EVT_BUTTON, self.OnShellProc, self.ShellProc)
self.Bind(wx.EVT_BUTTON, self.OnSendClear, self.ShellClear)
self.Bind(wx.EVT_BUTTON, self.OnShellSend, self.ShellSend)
self.Bind(wx.EVT_BUTTON, self.OnLoadSTL, self.LoadSTL)
self.Bind(wx.EVT_BUTTON, self.OnLoadGCode, self.LoadGCode)
self.Bind(wx.EVT_BUTTON, self.OnPrintCancel, self.PrintCancel)
self.Bind(wx.EVT_BUTTON, self.OnPauseResume, self.PauseResume)
# self.Bind(wx.EVT_BUTTON, self.OnSkeinForge, self.SkeinForge)
self.CreateStatusBar()
self.SetSizer(self.vlayout) self.SetSizer(self.vlayout)
self.vlayout.Fit(self) self.vlayout.Fit(self)
self.Layout() self.Layout()
self.EventBinding()
self.Centre() self.Centre()
self.Show(True) self.Show(True)
def EventBinding(self):
pass
def OnAbout(self,event): def OnAbout(self,event):
dlg = wx.MessageDialog( self, "Prusa - Mendel - RAMPS - Sprinter", "About Weaver", wx.OK) dlg = wx.MessageDialog( self, "Prusa - Mendel - RAMPS - Sprinter", "About Weaver", wx.OK)
dlg.ShowModal() dlg.ShowModal()
...@@ -126,6 +135,12 @@ try: ...@@ -126,6 +135,12 @@ try:
def OnExit(self,event): def OnExit(self,event):
self.Close(True) self.Close(True)
def OnSerialPort(self,event):
pass
def OnSerialSpeed(self,event):
pass
def OnShellProc(self,event): def OnShellProc(self,event):
pass pass
...@@ -135,6 +150,21 @@ try: ...@@ -135,6 +150,21 @@ try:
def OnShellSend(self,event): def OnShellSend(self,event):
pass pass
def OnLoadSTL(self,event):
pass
def OnLoadGCode(self,event):
pass
def OnPrintCancel(self,event):
pass
def OnPauseResume(self,event):
pass
def OnSkeinForge(self,event):
pass
except: except:
print("Library Failure -- Please install the wxPython Libraries") print("Library Failure -- Please install the wxPython Libraries")
quit() quit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment