def removeMenuEvent(self, menuItem, func=None): ''' Add new Menu item event handler function. Event handler function must be defined like func(owner, earg). ''' ev = event.EventHandlerInfo(menuItem, func) self._menuEvent -= ev
def removeWidgetEvent(self, widget, func=None): ''' Add new Widget event handler function. Event handler function must be defined like func(owner, earg). ''' ev = event.EventHandlerInfo(widget, func) self._widgetEvent -= ev
def removeCancelEvent(self, func): ''' Add new Cancel event handler function. Event handler function must be defined like func(owner, earg). ''' ev = event.EventHandlerInfo("__cancel__", func) self._cancelEvent -= ev
def removeTimeOutEvent(self, func): ''' Add new TimeOut event handler function. Event handler function must be defined like func(owner, earg). ''' ev = event.EventHandlerInfo("__timeout__", func) self._timeoutEvent -= ev
def addMenuEvent(self, menuItem, func, sendMenuItem=False): ''' Add new Menu item event handler function. Event handler function must be defined like func(owner, earg). If sendMenuItem is True func must be defined as func(owner, item, earg) and involved menu item is passed to handler ''' ev = event.EventHandlerInfo(menuItem, func, sendMenuItem) self._menuEvent += ev
def addWidgetEvent(self, widget, func, sendWidget=False): ''' Add new Widget event handler function. Event handler function must be defined like func(owner, earg). If sendWidget is True func must be defined as func(owner, widget, earg) and involved widget is passed to handler ''' ev = event.EventHandlerInfo(widget, func, sendWidget) self._widgetEvent += ev