Squeak Class Documentation category index | class index  
 
MorphicEventDispatcher
  category: Morphic-Events
  superclass: Object
  subclasses: CRAddFeatureMorphEventDispatcher

The class represents a strategy for dispatching events to some immediate child of a morph. It is used by morphs to delegate the somewhat complex action of dispatching events accurately.

instance methods
  dispatching
  dispatchDefault:with:
dispatchDropEvent:with:
dispatchEvent:with:
dispatchMouseDown:with:

class methods
  no messages
 

instance methods
  dispatching top  
 

dispatchDefault:with:

Dispatch the given event. The event will be passed to the front-most visible submorph that contains the position wrt. to the event.


 

dispatchDropEvent:with:

Find the appropriate receiver for the event and let it handle it. The dispatch is similar to the default dispatch with one difference: Morphs are given the chance to reject an entire drop operation. If the operation is rejected, no drop will be executed.


 

dispatchEvent:with:

Dispatch the given event for a morph that has chosen the receiver to dispatch its events. The method implements a shortcut for repeated dispatches of events using the same dispatcher.


 

dispatchMouseDown:with:

Find the appropriate receiver for the event and let it handle it. Default rules:
* The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event.
* When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is.
* When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed.
* If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event.


class methods
  no messages top