Squeak Class Documentation category index | class index  
 
TileMorph
  category: Morphic-Scripting Tiles
  superclass: RectangleMorph
  subclasses: SoundTile RandomNumberTile BooleanTile UndescribedTile AssignmentTileMorph ColorTileMorph NumericReadoutTile StringReadoutTile MenuTile SymbolListTile GraphicTile

A tile with up, down and suffix arrows.

To install new Forms for the arrows, just nil out UpPicture, DownPicture,
or SuffixPicture.
Create actors with the picture you want and write it out with these file names:
'tile inc arrow.morph' 'tile dec arrow.morph' 'tile suffix
arrow.morph'. Make sure that file is in the same directory as the image.
Open an EToy.

instance methods
  accessing
  abandonLabelFocus
associatedPlayer
downArrow:
labelMorph
lastTile
literal
literal:
operatorOrExpression
playerBearingCode
resultType
slotName
suffixArrow:
type
upArrow:

  arrows
  addArrows
addRetractArrow
addSuffixArrow
addSuffixIfCan
arrowAction:
couldRetract
deleteLastTwoTiles
deleteSuffixArrow
showSuffixChoices
variableDelay:

  code generation
  acceptNewLiteral
codeString
precedingTileType
scriptEdited
storeCodeOn:indent:

  copying
  veryDeepFixupWith:
veryDeepInner:

  dropping/grabbing
  justGrabbedFrom:

  initialization
  actualObject
adoptVocabulary:
bePossessive
bringUpToDate
currentVocabulary
initialize
isPossessive
rawVocabulary:
referTo:
retargetFrom:to:
setExpression:label:
setLiteral:
setNaturalLanguageTo:
setOperator:
setOperator:andUseWording:
setOperatorAndUseArrows:
setSlotRefOperator:
setToReferTo:
updateWordingToMatchVocabulary

  misc
  addCustomMenuItems:hand:
basicWidth
colorChangedForSubmorph:
currentEToyVocabulary
handReferentMorph
isTileLike
isTileScriptingElement
minimumWidth
numericValue
printOn:
restoreTypeColor
scriptPerformer
setLiteralInitially:
typeColor:
useUniformTileColor
wantsKeyboardFocusFor:

  mouse handling
  arrowDelta
handlerForMouseDown:
handlesMouseDown:
handlesMouseStillDown:
isCandidateForAutomaticViewing
mouseDown:
mouseStillDown:
presentOperatorAlternatives:

  object fileIn
 

  private
  convertAlignment
line1:
line1:line2:
ownerChanged
test
updateLiteralLabel

  tiles from method
  selectorTile:in:

class methods
  class initialization
  downPicture
downPicture:
fixCaretForms
initialize
readInArrowGraphics
suffixPicture
suffixPicture:
upPicture
upPicture:

  constants
  defaultH

instance methods
  accessing top  
 

abandonLabelFocus

If the receiver's label has editing focus, abandon it


 

associatedPlayer


 

downArrow:


 

labelMorph


 

lastTile

The tile that might get an extension arrow


 

literal


 

literal:


 

operatorOrExpression


 

playerBearingCode

Answer the actual Player object who will be the 'self' when the receiver is being asked to generate code


 

resultType

Answer the result type of the receiver


 

slotName

Caution: the slotName is not in use!


 

suffixArrow:


 

type


 

upArrow:


  arrows top  
 

addArrows


 

addRetractArrow

Must be situated in a script


 

addSuffixArrow


 

addSuffixIfCan

Should this tile have a suffix arrow?


 

arrowAction:

Do what is appropriate when an arrow on the tile is pressed; delta will be +1 or -1


 

couldRetract

See if it makes sense to retract this tile and the op before it. Return the phrase that gets retracted, or nil if not allowed.


 

deleteLastTwoTiles

Remove the current suffix (last two tiles) in this line of tiles


 

deleteSuffixArrow


 

showSuffixChoices

The suffix arrow has been hit, so respond appropriately


 

variableDelay:


  code generation top  
 

acceptNewLiteral

Tell the scriptEditor who I belong to that I have a new literal value.


 

codeString


 

precedingTileType

Return the slot reference type of the preceding TileMorph in my owner.


 

scriptEdited

Tell the scriptEditor who I belong to that I have changed.


 

storeCodeOn:indent:

Store code representing the receiver onto the stream, with the given amount of indentation


  copying top  
 

veryDeepFixupWith:

If target and arguments fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals!!


 

veryDeepInner:

Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment.


  dropping/grabbing top  
 

justGrabbedFrom:

The receiver was just grabbed from its former owner and is now attached to the hand. By default, we pass this message on if we're a renderer.


  initialization top  
 

actualObject


 

adoptVocabulary:

Set the receiver's vocabulary


 

bePossessive


 

bringUpToDate

Make certain, if the receiver is an object-reference tile, that it shows the current external name of the object, which may just have changed. This only applies to the Player regime.


 

currentVocabulary

Answer the receiver's current vocabulary


 

initialize


 

isPossessive


 

rawVocabulary:

Set the receiver's vocabulary, without side effects.


 

referTo:

Make the receiver be an object-reference tile whose referent is anObject


 

retargetFrom:to:

Change the receiver so that if formerly it referred to oldPlayer, it refers to newPlayer instead


 

setExpression:label:


 

setLiteral:

Set the receiver's literal to be anObject. Create a readout morph and add it to the receiver, deleting any existing one that may be there.


 

setNaturalLanguageTo:

With the natural language in the surrounding project having changed, get wording correct


 

setOperator:

Set the operator symbol from the string provided


 

setOperator:andUseWording:

Set the operator symbol from the string provided


 

setOperatorAndUseArrows:

Set the operator as per aString, and add up/down arrows


 

setSlotRefOperator:

getter represents the name of a slot that the receiver is to represent; configure the receiver to serve thi duty, and set upthe wording on the tile appropriately


 

setToReferTo:

Set the receiver to bear an object reference to the given object.


 

updateWordingToMatchVocabulary

The current vocabulary has changed; change the wording on my face, if appropriate


  misc top  
 

addCustomMenuItems:hand:

Add custom halo menu items to a menu


 

basicWidth

Provide a nominal minimum, exclusive of arrows and independent of label width


 

colorChangedForSubmorph:

Invoked when the user selects a new color on a colorTile or a color-seer-tile; need to recompile the script.


 

currentEToyVocabulary

Answer the etoy vocabulary that pertains


 

handReferentMorph

Hand the user the actual morph referred to


 

isTileLike

Can be dropped into a script


 

isTileScriptingElement


 

minimumWidth


 

numericValue


 

printOn:

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


 

restoreTypeColor


 

scriptPerformer

Guard against obscure circumstance in which the tile itself has an associated Player, which then might be asked to interact in inappropriate ways with, for example, an UpdatingStringMorph to provide the literal for a RandomNumberTile. This is at best a finger in the dike. Still very unsatisfactory!


 

setLiteralInitially:

Establish the initial literal. Get the label correct, but do *not* send the value back to the target via the setter (unlike #literal:)


 

typeColor:

Set the receiver's typeColor


 

useUniformTileColor


 

wantsKeyboardFocusFor:

Answer whether a plain mouse click on aSubmorph, a text-edit-capable thing, should result in a text selection there


  mouse handling top  
 

arrowDelta

Answer the amount by which a number I display should increase at a time


 

handlerForMouseDown:

Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event


 

handlesMouseDown:

Answer whether the receiver would handle the mouseDown represented by evt


 

handlesMouseStillDown:

Return true if the receiver wants to get repeated #mouseStillDown: messages between #mouseDown: and #mouseUp


 

isCandidateForAutomaticViewing


 

mouseDown:

The mouse went down on the receiver; take appropriate action


 

mouseStillDown:

See if arrows are being pressed and call arrowAction:...


 

presentOperatorAlternatives:

The receiver is a tile that represents an operator; a click on the receiver's label will pop up a menu of alternative operator choices


  object fileIn top  

  private top  
 

convertAlignment

Convert the receiver's alignment rules


 

line1:

Emblazon the receiver with the requested label. If the receiver already has a label, make the new label be of the same class


 

line1:line2:


 

ownerChanged

The receiver's owner, some kind of a pasteup, has changed its layout.


 

test

Set the position of all my submorphs. Compute my bounds. Caller must call layoutChanged or set fullBounds to nil.


 

updateLiteralLabel

Update the wording emblazoned on the tile, if needed


  tiles from method top  
 

selectorTile:in:

Make a selector (operator) tile


class methods
  class initialization top  
 

downPicture


 

downPicture:


 

fixCaretForms

TileMorph fixCaretForms


 

initialize

TileMorph readInArrowGraphics -- call manually if necessary to bring graphics forward


 

readInArrowGraphics

TileMorph readInArrowGraphics


 

suffixPicture


 

suffixPicture:


 

upPicture


 

upPicture:


  constants top  
 

defaultH