Function bound to event of selection in the Combobox, calls callback if callable
        
        :param args: Tkinter event
341987
def _on_select(self, *args):
        
        if callable(self.__callback):
            self.__callback(self.selection)
867568
def call(self, name: str, *args, **kwargs):
        ''''''
        if self._event_dispatcher is not None:
            self._event_dispatcher.notify(name, *args, **kwargs)

        if self._callbacks[name]:
            return self._callbacks[name](*args, **kwargs)
        else:
            raise HookDisconnected('No callback is connected.')
107282
def on_click(self, event):
        
        if event["button"] == self.button_toggle:
            # we only toggle if button was used
            if event.get("index") == "button" and self.py3.is_my_event(event):
                self.urgent = False
                self.open = not self.open
676124
def add_action_callback(self, *event):
        """"""
        if react_to_event(self.view, self.tree_view, event) and self.active_entry_widget is None:
            self.on_add(None)
            return True
301921
def bind(self, callback, sender=None):
        ''''''
        key = (_make_id(callback), _make_id(sender))
        self.callbacks.append((key, callback))
745223
def capture(self, *args, **kwargs):
        
        if not self.is_enabled():
            return

        data = self.build_msg(*args, **kwargs)

        future = self.send(callback=kwargs.get('callback', None), **data)

        return (data['event_id'], future)
308432
def event(self, event):
        
        if event.type() == QEvent.KeyPress and event.key() == Qt.Key_Tab:
            return False
        return QWidget.event(self, event)
1339804
def bind(self, event_name, callback):
        

        if event_name not in self.event_callbacks.keys():
            self.event_callbacks[event_name] = []

        self.event_callbacks[event_name].append(callback)
1005174
def trigger(self, *args, **kargs):
        
        event = args[0]

        if isinstance(event, str) and ' ' in event:
            event = event.split(' ')  # split event names ...

        if isinstance(event, list):  # event is a list of events
            for each in event:
                self.events[each].trigger(*args[1:], **kargs)
        else:
            self.events[event].trigger(*args[1:], **kargs)
833305
def _call_event(self, event_name, cmd, pargs, kwargs, **kws):
        
        def get_result_params(res):
            """return the right list of params"""
            if not isinstance(res, (list, tuple)):
                return res, pargs, kwargs
            elif len(res) == 2:
                return res, pargs, kwargs
            return res[0], (pargs[0], ) + tuple(res[1]), kwargs
        if hasattr(cmd, event_name):
            return get_result_params(
                getattr(cmd, event_name)(pargs[0], *pargs[1:], **kwargs))
        elif hasattr(cmd.__cls__, event_name):
            return get_result_params(
                getattr(cmd.__cls__, event_name)(
                    pargs[0], cmd.__cmd_name__ or cmd.__name__, *pargs[1:],
                    **kwargs))
        return None, pargs, kwargs
734674
def add_event(self, func: Callable, event: str) -> None:
        
        self._events[event].add(func)
95066
def bind(self, func):
        
        if self.__methods__ is None:
            self.__methods__ = {}
        self.__methods__[func.__name__] = BoundFunction(func)
1313629
function(event, ui){

	    // Prevent default selection input filling action (from
	    // jQuery UI) when non-default marked.
	    if( ! anchor._fill_p ){
		event.preventDefault();		
	    }

	    var doc_to_apply = null;
	    if( ui.item ){
		doc_to_apply = ui.item.document;
	    }

	    // Only do the callback if it is defined.
	    if( doc_to_apply && 
		bbop.core.is_defined(anchor._list_select_callback) ){
		anchor._list_select_callback(doc_to_apply);
	    }
	}
187966
function _fireCallback(callback, e, combo) {

    // if this event should not happen stop here
    if (this.NOT_IN_EDITABLES && this.stopCallback(e, e.target || e.srcElement, combo)) {
         return;
    }

    if (callback.call(callback.self, e, combo) === false) {
      if (e.preventDefault) {
        e.preventDefault();
      }

      if (e.stopPropagation) {
        e.stopPropagation();
      }

      e.returnValue = false;
      e.cancelBubble = true;
    }
  }
1148899
def trigger(self, event: str, *args: T.Any, **kw: T.Any) -> bool:
        """"""

        callbacks = list(self._events.get(event, []))
        if not callbacks:
            return False

        for callback in callbacks:
            callback(*args, **kw)
        return True
715789
def callback(self, event):
        
        self.init_width()

        if len(self.initial) > 0:
            for cell in self.initial:
                self.color_square(cell[0], cell[1], True)
            self.initial = []
        self.begin_drag = event
        self.color_square(event.x, event.y)
1140026
def trigger_event(self, source, event, args):
		
		actions = []
		for action in event.actions:
			if callable(action):
				ac = action(self, *args)
				if not ac:
					# Handle falsy returns
					continue
				if not hasattr(ac, "__iter__"):
					actions.append(ac)
				else:
					actions += action(self, *args)
			else:
				actions.append(action)
		ret = source.game.trigger(self, actions, args)
		if event.once:
			self._events.remove(event)

		return ret