Squeak Class Documentation category index | class index  
 
DoubleClickExample
  category: Morphic-Demo
  superclass: RectangleMorph
  subclasses:

Illustrates the double-click capabilities of Morphic.

If you have a kind of morph you wish to have respond specially to a double-click, it should:

(1) Respond "true" to #handlesMouseDown:

(2) In its mouseDown: method, send #waitForClicksOrDrag:event: to the hand.

(3) Reimplement #click: to react to single-clicked mouse-down.

(4) Reimplement #doubleClick: to make the appropriate response to a double-click.

(5) Reimplement #drag: to react to non-clicks. This message is sent continuously until the button is released. You can check the event argument to react differently on the first, intermediate, and last calls.

instance methods
  as yet unclassified
  balloonText
click:
doubleClick:
handlesMouseDown:
initialize
mouseDown:
startDrag:

class methods
  parts bin
  descriptionForPartsBin

instance methods
  as yet unclassified top  
 

balloonText

Answer balloon help text or nil, if no help is available.
NB: subclasses may override such that they programatically construct
the text, for economy's sake, such as model phrases in a Viewer


 

click:

Handle a single-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.
LC 2/14/2000 08:32 - added: EventHandler notification


 

doubleClick:

Handle a double-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.
LC 2/14/2000 08:32 - added: EventHandler notification


 

handlesMouseDown:

Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?


 

initialize


 

mouseDown:

Do nothing upon mouse-down except inform the hand to watch for a double-click; wait until an ensuing click:, doubleClick:, or drag: message gets dispatched


 

startDrag:

We'll get a mouseDown first, some mouseMoves, and a mouseUp event last


class methods
  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!