def __add_bindings(self): # file_save_ctrl self.fsc = control.FileChooserCtrl(self) self.Bind(wx.EVT_BUTTON, self.fsc.load_file, self.file_open_button) self.Bind(wx.EVT_BUTTON, self.fsc.save_file, self.save_button) # record_button_ctrl self.rbc = control.RecordCtrl() self.Bind(wx.EVT_TOGGLEBUTTON, self.rbc.action, self.record_button) # play_button_ctrl pbc = control.PlayCtrl() self.Bind(wx.EVT_TOGGLEBUTTON, pbc.action, self.play_button) # compile_button_ctrl self.Bind(wx.EVT_BUTTON, control.CompileCtrl.compile, self.compile_button) # help_button_ctrl self.Bind(wx.EVT_BUTTON, control.HelpCtrl.action, self.help_button) # settings_button_ctrl self.Bind(wx.EVT_BUTTON, self.on_settings_click, self.settings_button) self.Bind(wx.EVT_CLOSE, self.on_close_dialog) self.panel.Bind(wx.EVT_KEY_UP, self.on_key_press)
def __add_bindings(self): # file_save_ctrl self.fsc = control.FileChooserCtrl(self) self.Bind(wx.EVT_BUTTON, self.fsc.load_file, self.file_open_button) self.Bind(wx.EVT_BUTTON, self.fsc.save_file, self.save_button) # record_button_ctrl self.rbc = control.RecordCtrl() self.Bind(wx.EVT_TOGGLEBUTTON, self.rbc.action, self.record_button) # play_button_ctrl self.pbc = control.PlayCtrl() self.Bind(wx.EVT_TOGGLEBUTTON, self.pbc.action, self.play_button) # Handle the event returned after a playback has completed self.Bind(self.pbc.EVT_THREAD_END, self.on_thread_end) # compile_button_ctrl self.Bind(wx.EVT_BUTTON, control.CompileCtrl.compile, self.compile_button) # help_button_ctrl self.Bind(wx.EVT_BUTTON, control.HelpCtrl.action, self.help_button) # settings_button_ctrl self.Bind(wx.EVT_BUTTON, self.on_settings_click, self.settings_button) self.sc = control.SettingsCtrl(self) self.Bind(wx.EVT_CLOSE, self.on_close_dialog) # Handle keyboard shortcuts self.panel.Bind(wx.EVT_KEY_UP, self.on_key_press) self.panel.SetFocus()