def on_set_focus(self, event=None): """ The derivative class is on focus if implemented """ if self.parent is not None: if self.parent.parent is not None: wx.PostEvent(self.parent.parent, PanelOnFocusEvent(panel=self)) self.page_finder = self.parent._manager.get_page_finder()
def on_set_focus(self, event): """ """ pos = self.GetSelection() if pos != -1: selected_page = self.GetPage(pos) wx.PostEvent(self._manager.parent, PanelOnFocusEvent(panel=selected_page))
def _set_analysis(self, flag): """ Set the Analysis Save state flag and informs the manager so it refreshes the menu/whole panel """ self._set_save_flag(flag) if self._manager is not None: wx.PostEvent(self._manager.parent, PanelOnFocusEvent(panel=self))
def helper_on_page_change(self): """ """ pos = self.GetSelection() if pos != -1: selected_page = self.GetPage(pos) wx.PostEvent(self._manager.parent, PanelOnFocusEvent(panel=selected_page)) self.enable_close_button()
def onLeftDown(self, event): """ left button down and ready to drag """ # Check that the LEFT button was pressed PlotPanel.onLeftDown(self, event) ax = event.inaxes if ax is not None: # data coordinate position pos_x = "%8.3g" % event.xdata pos_y = "%8.3g" % event.ydata position = "x: %s y: %s" % (pos_x, pos_y) wx.PostEvent(self.parent, StatusEvent(status=position)) self.plottable_selected(self.data2D.id) self._manager.set_panel_on_focus(self) wx.PostEvent(self.parent, PanelOnFocusEvent(panel=self))
def onLeftDown(self, event): """ left button down and ready to drag Display the position of the mouse on the statusbar """ # self.parent.set_plot_unfocus() self._get_cusor_lines(event) ax = event.inaxes PlotPanel.onLeftDown(self, event) if ax is not None: try: pos_x = float(event.xdata) # / size_x pos_y = float(event.ydata) # / size_y pos_x = "%8.3g" % pos_x pos_y = "%8.3g" % pos_y self.position = str(pos_x), str(pos_y) wx.PostEvent(self.parent, StatusEvent(status=self.position)) except: self.position = None # unfocus all self.parent.set_plot_unfocus() # post nd event to notify guiframe that this panel is on focus wx.PostEvent(self.parent, PanelOnFocusEvent(panel=self))
def on_set_focus(self, event=None): if self._manager.parent is not None: wx.PostEvent(self._manager.parent, PanelOnFocusEvent(panel=self))
def on_set_focus(self, event=None): """ The derivative class is on focus if implemented """ if self.parent is not None: wx.PostEvent(self.parent, PanelOnFocusEvent(panel=self))