Squeak Class Documentation category index | class index  
 
WordGameLetterMorph
  category: Morphic-Games
  superclass: BorderedMorph
  subclasses:

WordGameLetterMorph implements letter boxes for type-in and display of letter in word games. Several variant displays are supported, depending on the setting of style, and blanks can be displayed as black boxes or empty letter boxes.

Default support for type-in is distributed between this class and WordGamePaneMorph

letter the Character stored in this morph.
Can be either blank or nil as well as a letter.
indexInQuote a retained copy of the index of this character
Facilitates responses to, eg, clicking or typing in this box.
If indexInQuote==nil, then this is displayed as a black box
predecessor another LetterMorph or nil
Used for linked typing and, eg, word selection
successor another LetterMorph or nil
Used for linked typing and, eg, word selection
style a Symbol, one of #(plain boxed underlined)
Boxed and underlined display further depends on whether
the id strings are nil or not.
Each format has an associated default size

The following two variables are also submorphs, as are the id strings if present.
letterMorph a StringMorph for displaying the letter
Used when changing the letter to be displayed
lineMorph a PolygonMorph used to display the underline
and also to place the id string in underlined format

instance methods
  accessing
  indexInQuote
isBlank
letter
predecessor
predecessor:
successor
successor:

  initialization
  id2:
indexInQuote:id1:
normalColor
setLetter:
setLetter:color:

  linking
  morphsInWordDo:
nextTypeableLetter
previousTypeableLetter
startOfWord

  style inits
  boxed
plain
underlined

  typing
  handlesKeyboard:
keyboardFocusChange:
unhighlight

class methods
  as yet unclassified
  includeInNewMorphMenu
initialize

instance methods
  accessing top  
 

indexInQuote


 

isBlank


 

letter


 

predecessor


 

predecessor:


 

successor


 

successor:


  initialization top  
 

id2:

Add further clue id for acrostic puzzles.


 

indexInQuote:id1:

Initialize me with the given index and an optional idString


 

normalColor


 

setLetter:


 

setLetter:color:


  linking top  
 

morphsInWordDo:


 

nextTypeableLetter


 

previousTypeableLetter


 

startOfWord


  style inits top  
 

boxed


 

plain


 

underlined


  typing top  
 

handlesKeyboard:

Return true if the receiver wishes to handle the given keyboard event


 

keyboardFocusChange:

The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus. This default implementation does nothing.


 

unhighlight


class methods
  as yet unclassified top  
 

includeInNewMorphMenu

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


 

initialize

WordGameLetterMorph initialize