Ejemplo n.º 1
0
    def show_toolbar_popup(self, event):
        if self.aui_uses_provider:
            for item in self.rects:
                if item.Contains(event.Position):
                    break
            else:
                return

        event.EventObject.PopupMenu(self.toolbar_menu,
                                    guiutil.get_mouse_pos(event.EventObject))
Ejemplo n.º 2
0
	def show_toolbar_popup(self, event):
		if self.aui_uses_provider:
			for item in self.rects:
				if item.Contains(event.Position):
					break
			else:
				return

		event.EventObject.PopupMenu(self.toolbar_menu,
		guiutil.get_mouse_pos(event.EventObject))
Ejemplo n.º 3
0
	def show_popup(self, event):
		event_object = event.EventObject
		
		self.popup_position = guiutil.get_mouse_pos(event_object)
		
		menu = guiconfig.mainfrm.make_menu(
			[x for (x, where_shown) in self.get_menu_items(event) 
				if where_shown & IN_POPUP],
			is_popup=True)
		
		event_object.PopupMenu(menu, self.popup_position)
	
		# turns out this should be destroyed
		# according to [wxPython-dev] Segmentation faults - a theory
		menu.Destroy()