- def __init__(self, parent, id, title):
- wx.wxFrame.__init__(self, parent, id, title,
- wx.wxPyDefaultPosition, wx.wxSize(400, 400))
-
- # Now Create the menu bar and items
- self.mainmenu = wx.wxMenuBar()
-
- menu = wx.wxMenu()
- menu.Append(200, '&Print...', 'Print the current plot')
- wx.EVT_MENU(self, 200, self.OnFilePrint)
- menu.Append(209, 'E&xit', 'Enough of this already!')
- wx.EVT_MENU(self, 209, self.OnFileExit)
- self.mainmenu.Append(menu, '&File')
-
- menu = wx.wxMenu()
- menu.Append(210, '&Draw', 'Draw plots')
- wx.EVT_MENU(self,210,self.OnPlotDraw)
- menu.Append(211, '&Redraw', 'Redraw plots')
- wx.EVT_MENU(self,211,self.OnPlotRedraw)
- menu.Append(212, '&Clear', 'Clear canvas')
- wx.EVT_MENU(self,212,self.OnPlotClear)
- self.mainmenu.Append(menu, '&Plot')
-
- menu = wx.wxMenu()
- menu.Append(220, '&About', 'About this thing...')
- wx.EVT_MENU(self, 220, self.OnHelpAbout)
- self.mainmenu.Append(menu, '&Help')
-
- self.SetMenuBar(self.mainmenu)
-
- # A status bar to tell people what's happening
- self.CreateStatusBar(1)
-
- self.client = PlotCanvas(self)
-
- def OnFilePrint(self, event):
- d = wx.wxMessageDialog(self,
+ def __init__(self, parent, id, title):
+ wx.wxFrame.__init__(self, parent, id, title,
+ wx.wxPyDefaultPosition, wx.wxSize(400, 400))
+
+ # Now Create the menu bar and items
+ self.mainmenu = wx.wxMenuBar()
+
+ menu = wx.wxMenu()
+ menu.Append(200, '&Print...', 'Print the current plot')
+ wx.EVT_MENU(self, 200, self.OnFilePrint)
+ menu.Append(209, 'E&xit', 'Enough of this already!')
+ wx.EVT_MENU(self, 209, self.OnFileExit)
+ self.mainmenu.Append(menu, '&File')
+
+ menu = wx.wxMenu()
+ menu.Append(210, '&Draw', 'Draw plots')
+ wx.EVT_MENU(self,210,self.OnPlotDraw)
+ menu.Append(211, '&Redraw', 'Redraw plots')
+ wx.EVT_MENU(self,211,self.OnPlotRedraw)
+ menu.Append(212, '&Clear', 'Clear canvas')
+ wx.EVT_MENU(self,212,self.OnPlotClear)
+ self.mainmenu.Append(menu, '&Plot')
+
+ menu = wx.wxMenu()
+ menu.Append(220, '&About', 'About this thing...')
+ wx.EVT_MENU(self, 220, self.OnHelpAbout)
+ self.mainmenu.Append(menu, '&Help')
+
+ self.SetMenuBar(self.mainmenu)
+
+ # A status bar to tell people what's happening
+ self.CreateStatusBar(1)
+
+ self.client = PlotCanvas(self)
+
+ def OnFilePrint(self, event):
+ d = wx.wxMessageDialog(self,