Werner Kassens wrote:
mouseOver, i think
werner

On 08/19/2014 10:17 AM, Ben Coman wrote:

It took a bit of hunting around to discover how to use the custom hooks
for mouse event, and I needed to make some examples to prove how it
worked.  I thought others might find this interesting.  It just outputs
to Transcript for each of the following events.  Check the class
comments for usage.

* handlesMouseDown - mouseDown, mouseUp, mouseMove, startDrag, click,
doubleClick, doubleClickTimeout.
* handlesMouseStillDown - mouseStillDown.
* handlesMouseOver - mouseEnter, mouseLeave.
* handlesMouseOverDragging - mouseEnterDragging, mouseLeaveDragging.

Anyone know anything more to add?

cheers -ben



Thanks for your feedback Werner. That prompted me to go looking for something more to learn. It seems mouseOver is generally used more low level as part of the infrastructure rather than as a user handler. Morph does not define the method 'mouseOver'. Its only defined on PanelMorph.

The symbol #mouseOver is used in a few places:
* PanelMorph seems the only user of the class MouseOverEventHandler which references #mouseOver in its 'mouseOver:fromMorph:' method * MultistateLabelMorph (which has no references in the Pharo Image) references #mouseOver as a Dictionary key for colours for its 'interactionState'
* MorphicEvent>>isMouseOver references #mouseOver. This has three senders
* DockingBarMorph>>#handleFocusEvent: checks isMouseOver to stop processing the event. * MenuMorph>>handleFocusEvent: checks isMouseOver to stop processing the event.
  * HandMorph>>handleEvent:   checks isMOuseOver to 'sendMouseEvent'
* MouseEvent>>sentTo: for type==#mouseOver sends message 'handleMouseOver:' , which is already covered in the previously provided Examples.

I've added an additional example showing mouseOver usage for PanelMorph. Do you have any other usage examples for mouseOver?

cheers -ben



Reply via email to