コード例 #1
0
 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
コード例 #2
0
 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
コード例 #3
0
 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
コード例 #4
0
 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
コード例 #5
0
 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
コード例 #6
0
 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