Squeak Class Documentation category index | class index  
 
PlayingCardMorph
  category: Morphic-Games
  superclass: ImageMorph
  subclasses:

This class displays images from the PlayingCard class as morphs. It attempts to be space-efficient by only producing its images on demand.

instance methods
  access
  board
cardDeck
cardNumber
cardNumber:suitNumber:
suit
suitColor
suitNumber

  dropping/grabbing
  aboutToBeGrabbedBy:
justDroppedInto:event:
slideBackToFormerSituation:

  events
  click:
doubleClick:
firstClickTimedOut:
handlesMouseDown:
mouseDown:

  printing
  printOn:

class methods
  access
  cardSize
height
suits
width

  initialize-release
  includeInNewMorphMenu
the:of:

  testing
  test

instance methods
  access top  
 

board


 

cardDeck


 

cardNumber


 

cardNumber:suitNumber:


 

suit


 

suitColor


 

suitNumber


  dropping/grabbing top  
 

aboutToBeGrabbedBy:

I'm about to be grabbed by the hand. If other cards are above me in a deck,
then move them from the deck to being submorphs of me


 

justDroppedInto:event:

This message is sent to a dropped morph after it has been dropped on -- and been accepted by -- a drop-sensitive morph


 

slideBackToFormerSituation:


  events top  
 

click:

since we really want to know about double-clicks before making our move, ignore this and wait until #firstClickTimedOut: arrives


 

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


 

firstClickTimedOut:

Useful for double-click candidates who want to know whether or not the click is a single or double. In this case, ignore the #click: and wait for either this or #doubleClick:


 

handlesMouseDown:

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


 

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


  printing top  
 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


class methods
  access top  
 

cardSize

a real hack, but I don't want to muck with Dan's class


 

height


 

suits


 

width


  initialize-release top  
 

includeInNewMorphMenu

Return true for all classes that can be instantiated from the menu


 

the:of:


  testing top  
 

test

Display all cards in the deck