Squeak Class Documentation category index | class index  
 
PasteUpMorph
  category: Morphic-Worlds
  superclass: BorderedMorph
  subclasses: ComponentLayout WiWPasteUpMorph TetrisBoard IndexTabs TextPlusPasteUpMorph GeeBookPageMorph ZASMScriptMorph ZoomAndScrollMorph SyntaxTestMethods PartsBin

A morph whose submorphs comprise a paste-up of rectangular subparts which "show through". Anything called a 'Playfield' is a PasteUpMorph.

Facilities commonly needed on pages of graphical presentations and on simulation playfields, such as the painting of new objects, turtle trails, gradient fills, background paintings, parts-bin behavior, collision-detection, etc., are (or will be) provided.

A World, the entire Smalltalk screen, is a PasteUpMorph. A World responds true to isWorld. Morph subclasses that have specialized menus (BookMorph) build them in the message addBookMenuItemsTo:hand:. A PasteUpMorph that is a world, builds its menu in HandMorph buildWorldMenu.

presenter A Presenter in charge of stopButton stepButton and goButton,
mouseOverHalosEnabled soundsEnabled fenceEnabled coloredTilesEnabled.
model <not used>
cursor ??
padding ??
backgroundMorph A Form that covers the background.
turtleTrailsForm Moving submorphs may leave trails on this form.
turtlePen Draws the trails.
lastTurtlePositions A Dictionary of (aPlayer -> aPoint) so turtle trails can be drawn
only once each step cycle. The point is the start of the current stroke.
isPartsBin If true, every object dragged out is copied.
autoLineLayout ??
indicateCursor ??
resizeToFit ??
wantsMouseOverHalos If true, simply moving the cursor over a submorph brings up its halo.
worldState If I am also a World, keeps the hands, damageRecorder, stepList etc.
griddingOn If true, submorphs are on a grid

instance methods
  Nebraska
  addRemoteClient:
convertRemoteClientToBuffered:
hasRemoteServer
releaseRemoteServer
remoteServer
remoteServer:
removeRemoteClient:
transferRemoteServerFrom:

  WiW support
  restartWorldCycleWithEvent:
validateMouseEvent:

  accessing
  assureFlapWidth:
flapTab
useRoundedCorners

  alarms-scheduler
  addAlarm:withArguments:for:at:
removeAlarm:for:

  classification
  isWorldMorph
world

  cursor
  cursor
cursor:
cursorWrapped:
numberAtCursor
rectifyCursor
selectedRect
valueAtCursor
valueAtCursor:

  display
  canHaveFillStyles
drawOn:
gradientFillColor:
printOn:
setGradientColor:

  dropping/grabbing
  acceptDroppingMorph:event:
automaticPhraseExpansion
automaticViewing
dropEnabled
dropFiles:
justDroppedInto:event:
morphToDropFrom:
originAtCenter
positionNear:forExtent:adjustmentSuggestion:
repelsMorph:event:
wantsDropFiles:
wantsDroppedMorph:event:

  event handling
  handlesKeyboard:
handlesMouseDown:
morphToGrab:
mouseDown:
mouseUp:
processEvent:using:

  flaps
  accommodateFlap:
addGlobalFlaps
assureFlapTabsFitOnScreen
bringFlapTabsToFront
correspondingFlapTab
deleteAllFlapArtifacts
deleteGlobalFlapArtifacts
enableGlobalFlaps
flapTabs
localFlapTabs
offsetForAccommodating:onEdge:
paintingFlapTab
releaseViewers
removeAccommodationForFlap:

  genie-processing
  allowsGestureStart:

  gridding
  gridModulus
gridModulus:
gridOrigin
gridOrigin:
gridPoint:
gridSpec
gridSpecPut:
gridVisible
gridVisibleOnOff
gridVisibleString
griddingOn
griddingOnOff
griddingString
setGridSpec

  initialization
  adaptedToWorld:
becomeActiveDuring:
initialize
initializeToStandAlone
newResourceLoaded
releaseCachedState

  interaction loop
  doOneCycleNow
keyStroke:

  layout
  addCenteredAtBottom:offset:
convertAlignment
laySubpartsOutInOneRow
layoutChanged

  menu & halo
  addCustomMenuItems:hand:
addPenMenuItems:hand:
addPenTrailsMenuItemsTo:
addPlayfieldMenuItems:hand:
addScalingMenuItems:hand:
addStackMenuItems:hand:
addWorldHaloMenuItemsTo:hand:
addWorldToggleItemsToHaloMenu:
autoExpansionString
autoLineLayoutString
autoViewingString
batchPenTrailsString
buildDebugMenu:
defersHaloOnClickTo:
defineApplicationView
defineFactoryView
deleteBalloonTarget:
fenceEnabledString
indicateCursorString
isOpenForDragNDropString
isPartsBinString
mightEntertainDirectionHandles
mouseOverHalosString
originAtCenterString
playfieldOptionsMenu
presentCardAndStackMenu
presentPlayfieldMenu
presentViewMenu
reformulateUpdatingMenus
saveOnFile
showApplicationView
showExpandedView
showFactoryView
showFullView
showReducedView
showThumbnailString
transformToShow:
wantsDirectionHandles
wantsHaloFor:
wantsHaloFromClick

  misc
  abandonCostumeHistory
allScriptEditors
allScriptors
alwaysShowThumbnail
cachedOrNewThumbnailFrom:
cartesianOrigin
closedViewerFlapTabs
containsCard:
demandsBoolean
heightForThumbnails
hideFlapsOtherThan:ifClingingTo:
hideViewerFlaps
hideViewerFlapsOtherThanFor:
impartPrivatePresenter
innocuousName
invalidRect:from:
isPlayfieldLike
makeDetachable
maxHeightToAvoidThumbnailing
maximumThumbnailWidth
mouseX
mouseY
nameForCopyIfAlreadyNamed:
padding:
position:
prepareToBeSaved
presenter
residesInPartsBin
roundUpStrays
shouldGetStepsFrom:
smallThumbnailForPageSorter
startRunningAll
step
stepAll
stepTime
stopRunningAll
thumbnailForPageSorter
unhideHiddenObjects
updateStatusForAllScriptEditors
viewerFlapTabFor:
wantsKeyboardFocusFor:

  model
  createCustomModel
model
modelOrNil
setModel:

  naming
  defaultNameStemForInstances

  object fileIn
  convertToCurrentVersion:refStream:

  options
  autoLineLayout
autoLineLayout:
automaticViewing:
batchPenTrails
batchPenTrails:
becomeLikeAHolder
behaveLikeAHolderString
behaveLikeHolder
behaveLikeHolder:
behavingLikeAHolder
fenceEnabled
fenceEnabled:
indicateCursor
indicateCursor:
isPartsBin
isPartsBin:
replaceTallSubmorphsByThumbnails
resizeToFit
resizeToFitString
setPartsBinStatusTo:
setThumbnailHeight
toggleAlwaysShowThumbnail
toggleAutoLineLayout
toggleAutomaticPhraseExpansion
toggleAutomaticViewing
toggleBatchPenTrails
toggleBehaveLikeAHolder
toggleFenceEnabled
toggleIndicateCursor
toggleIsPartsBin
toggleMouseOverHalos
toggleOriginAtCenter
toggleResizeToFit
updateSubmorphThumbnails
wantsMouseOverHalos
wantsMouseOverHalos:

  painting
  backgroundSketch
backgroundSketch:
deleteBackgroundPainting
makeNewDrawingWithin
paintBackground
paintingBoundsAround:
prepareToPaint
prepareToPaint:
reasonablePaintingExtent

  pen
  addImageToPenTrailsFor:
arrowheadsOnAllPens
clearTurtleTrails
createOrResizeTrailsForm
drawPenTrailFor:from:to:
liftAllPens
lowerAllPens
noArrowheadsOnAllPens
noteNewLocation:forPlayer:
notePenDown:forPlayer:at:
trailMorph
updateTrailsForm

  private
  morphicLayerNumber
privateFullMoveBy:

  project
  project
releaseSqueakPages
storeProjectsAsSegments

  project state
  activeHand
canvas
firstHand
hands
handsDo:
isStepping:
isStepping:selector:
listOfSteppingMorphs
modelWakeUp
stepListSize
stepListSummary
steppingMorphsNotInWorld
viewBox
viewBox:

  scripting
  abandonOldReferenceScheme
allTileScriptingElements
currentVocabulary
currentVocabularyFor:
hideAllPlayers
isCandidateForAutomaticViewing
modernizeBJProject
recreateScripts
relaunchAllViewers
scriptorForTextualScript:ofPlayer:
showAllPlayers

  stepping
  cleanseStepList
runLocalStepMethods
runStepMethods
startStepping:
startStepping:at:selector:arguments:stepTime:
stopStepping:
stopStepping:selector:

  submorphs-accessing
  morphsInFrontOf:overlapping:do:

  submorphs-add/remove
  addMorphFront:
addMorphInLayer:

  undo
  clearCommandHistory
commandHistory

  update cycle
  startBackgroundProcess

  viewing
  addViewingItemsTo:
imposeListViewSortingBy:retrieving:
restoreBoundsOfSubmorphs
saveBoundsOfSubmorphs
scriptSelectorToTriggerFor:
showingListView
sortSubmorphsBy:
viewByIcon
viewByName
viewBySize
viewNonOverlapping
viewingByIconString
viewingByNameString
viewingBySizeString
viewingNonOverlappingString
viewingNormally

  world menu
  activateObjectsTool
addUndoItemsTo:
bringWindowsFullOnscreen
buildWorldMenu:
closeUnchangedWindows
collapseAll
collapseNonWindows
connectRemoteUser
connectRemoteUserWithName:picture:andIPAddress:
deleteNonWindows
detachableScriptingSpace
disconnectAllRemoteUsers
disconnectRemoteUser
drawingClass
expandAll
extractScreenRegion:andPutSketchInHand:
findAChangeSorter:
findAMessageNamesWindow:
findAPreferencesPanel:
findATranscript:
findDirtyBrowsers:
findDirtyWindows:
findWindow:
getWorldMenu:
grabDrawingFromScreen:
grabFloodFromScreen:
grabLassoFromScreen:
grabRubberBandFromScreen:
invokeWorldMenu:
keystrokeInWorld:
makeNewDrawing:
makeNewDrawing:at:
newDrawingFromMenu:
openRecentSubmissionsBrowser:
openScrapsBook:
printScriptSummary
putUpDesktopMenu:
putUpWorldMenu:
putUpWorldMenuFromEscapeKey
removeAllViewers
reportLocalAddress
showStatusOfAllScripts
yellowButtonClickOnDesktopWithEvent:

  world state
  abandonAllHalos
abandonVocabularyPreference
activeHand:
addAllMorphs:
addHand:
addMorph:centeredNear:
addMorphsAndModel:
allMorphsDo:
allNonFlapRelatedSubmorphs
assureNotPaintingElse:
assureNotPaintingEvent:
assuredCanvas
beWorldForProject:
checkCurrentHandForObjectToPaste
checkCurrentHandForObjectToPaste2
chooseClickTarget
colorAt:belowMorph:
currentNaturalLanguage
deEmphasizeViewMVC:
deleteAllHalos
displayWorld
displayWorldAsTwoTone
displayWorldNonIncrementally
displayWorldSafely
doOneCycle
doOneCycleInBackground
doOneSubCycle
dragThroughOnDesktop:
embeddedProjectDisplayMode
endDrawing:
exit
extent:
flashRects:color:
fullContainsPoint:
fullRepaintNeeded
goBack
haloMorphOrNil
haloMorphs
handleFatalDrawingError:
initForProject:
install
installAsActiveSubprojectIn:at:titled:
installAsActiveSubprojectIn:titled:
installFlaps
installVectorVocabulary
jumpToProject
nextPage
open
openWithTitle:cautionOnClose:
optimumExtentFromAuthor
paintArea
paintAreaFor:
paintBox
paintBoxOrNil
patchAt:without:andNothingAbove:
pauseEventRecorder
previousPage
privateMoveBy:
privateOuterDisplayWorld
referencePlayfield
removeHand:
repairEmbeddedWorlds
repositionFlapsAfterScreenSizeChange
restoreDisplay
restoreFlapsDisplay
restoreMorphicDisplay
saveAsWorld
sketchEditorOrNil
sleep
someHalo
specialNameInModelFor:
standardPlayerHit
standardSystemController
startSteppingSubmorphsOf:
triggerClosingScripts
triggerOpeningScripts
veryDeepCopyWith:

class methods
  project
  MinCycleLapse:
disableDeferredUpdates
disableDeferredUpdates:
initialize
newWorldForProject:
newWorldTesting
shutDown
startUp

  scripting
  additionsToViewerCategories
authoringPrototype
defaultNameStemForInstances
descriptionForPartsBin
supplementaryPartsDescriptions

instance methods
  Nebraska top  
 

addRemoteClient:


 

convertRemoteClientToBuffered:


 

hasRemoteServer


 

releaseRemoteServer

My server has been transferred to some other world. Release pending references


 

remoteServer


 

remoteServer:


 

removeRemoteClient:


 

transferRemoteServerFrom:

Transfer the remote server which was associated with aWorld (if any) to the receiver


  WiW support top  
 

restartWorldCycleWithEvent:

RAA 27 Nov 99 - redispatch that click picked up from our inner world


 

validateMouseEvent:


  accessing top  
 

assureFlapWidth:


 

flapTab


 

useRoundedCorners

Somewhat special cased because we do have to fill Display for this


  alarms-scheduler top  
 

addAlarm:withArguments:for:at:

Add a new alarm with the given set of parameters


 

removeAlarm:for:

Remove the alarm with the given selector


  classification top  
 

isWorldMorph


 

world


  cursor top  
 

cursor

vacuous backstop in case it gets sent to a morph that doesn't know what to do with it


 

cursor:

for backward compatibility


 

cursorWrapped:

Set the cursor to the given number, modulo the number of items I contain. Fractional cursor values are allowed.


 

numberAtCursor

Answer the number represented by the object at my current cursor position


 

rectifyCursor


 

selectedRect

Return a rectangle enclosing the morph at the current cursor. Note that the cursor may be a float and may be out of range, so pick the nearest morph. Assume there is at least one submorph.


 

valueAtCursor

Answer the submorph of mine indexed by the value of my 'cursor' slot


 

valueAtCursor:


  display top  
 

canHaveFillStyles

Return true if the receiver can have general fill styles; not just colors.
This method is for gradually converting old morphs.


 

drawOn:

Update and draw the turtleTrails form. See the comment in updateTrailsForm.


 

gradientFillColor:

For backwards compatibility with GradientFillMorph


 

printOn:

Reimplemented to add a tag showing that the receiver is currently functioning as a 'world', if it is


 

setGradientColor:

For backwards compatibility with GradientFillMorph


  dropping/grabbing top  
 

acceptDroppingMorph:event:

The supplied morph, known to be acceptable to the receiver, is now to be assimilated; the precipitating event is supplied


 

automaticPhraseExpansion


 

automaticViewing

Backstop, in case this message gets sent to an owner that is not a playfield


 

dropEnabled

Get this morph's ability to add and remove morphs via drag-n-drop.


 

dropFiles:

Handle a number of dropped files from the OS.
TODO:
- use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu)
- remember the resource location or (when in browser) even the actual file handle


 

justDroppedInto:event:

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


 

morphToDropFrom:

Given a morph being carried by the hand, which the hand is about to drop, answer the actual morph to be deposited. Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service.


 

originAtCenter


 

positionNear:forExtent:adjustmentSuggestion:

Compute a plausible positioning for adding a subpart of size anExtent, somewhere near aPoint, using adjustmentPoint as the unit of adjustment


 

repelsMorph:event:


 

wantsDropFiles:

Return true if the receiver wants files dropped from the OS.


 

wantsDroppedMorph:event:

Return true if the receiver wishes to accept the given morph, which is being dropped by a hand in response to the given event. Note that for a successful drop operation both parties need to agree. The symmetric check is done automatically via aMorph wantsToBeDroppedInto: self.


  event handling top  
 

handlesKeyboard:

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


 

handlesMouseDown:

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


 

morphToGrab:

Return the morph to grab from a mouse down event. If none, return nil.


 

mouseDown:

Handle a mouse down event.


 

mouseUp:

Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.


 

processEvent:using:

Reimplemented to install the receiver as the new ActiveWorld if it is one


  flaps top  
 

accommodateFlap:

Shift submorphs over, if appropriate


 

addGlobalFlaps

Must make global flaps adapt to world. Do this even if not shown, so the old world will not be pointed at by the flaps.


 

assureFlapTabsFitOnScreen


 

bringFlapTabsToFront


 

correspondingFlapTab

If there is a flap tab whose referent is me, return it, else return nil


 

deleteAllFlapArtifacts

self currentWorld deleteAllFlapArtifacts


 

deleteGlobalFlapArtifacts

Delete all flap-related detritus from the world


 

enableGlobalFlaps

Restore saved global flaps, or obtain brand-new system defaults if necessary


 

flapTabs


 

localFlapTabs

Answer a list of local flap tabs in the current project


 

offsetForAccommodating:onEdge:

Answer a delta to be applied to my submorphs in order tfor anExtent to be slid inboard on the indicated edge


 

paintingFlapTab

If the receiver has a flap which has a paintbox, return it, else return nil


 

releaseViewers

In preparation for saving, make the flapTabs release their viewers.


 

removeAccommodationForFlap:

Shift submorphs over, if appropriate


  genie-processing top  
 

allowsGestureStart:


  gridding top  
 

gridModulus


 

gridModulus:


 

gridOrigin


 

gridOrigin:


 

gridPoint:


 

gridSpec

Gridding rectangle provides origin and modulus


 

gridSpecPut:

Gridding rectangle provides origin and modulus


 

gridVisible


 

gridVisibleOnOff


 

gridVisibleString

Answer a string to be used in a menu offering the opportunity to show or hide the grid


 

griddingOn


 

griddingOnOff


 

griddingString

Answer a string to use in a menu offering the user the opportunity to start or stop using gridding


 

setGridSpec

Gridding rectangle provides origin and modulus


  initialization top  
 

adaptedToWorld:

If I refer to a world or a hand, return the corresponding items in the new world.


 

becomeActiveDuring:

Make the receiver the ActiveWorld during the evaluation of aBlock.
Note that this method does deliberately *not* use #ensure: to prevent
re-installation of the world on project switches.


 

initialize


 

initializeToStandAlone

Answer an instance of the receiver suitable for placing in a parts bin for authors


 

newResourceLoaded

Some resource has just been loaded. Notify all morphs in case somebody wants to update accordingly.


 

releaseCachedState

Release any state that can be recomputed on demand, such as the pixel values for a color gradient or the editor state for a TextMorph. This method may be called to save space when a morph becomes inaccessible. Implementations of this method should do 'super releaseCachedState'.


  interaction loop top  
 

doOneCycleNow

Do one cycle of the interactive loop. This method is called repeatedly when the world is running.


 

keyStroke:

A keystroke has been made. Service event handlers and, if it's a keystroke presented to the world, dispatch it to #unfocusedKeystroke:


  layout top  
 

addCenteredAtBottom:offset:

Add aMorph beneath all other morphs currently in the receiver, centered horizontally, with the vertical offset from the bottom of the previous morph given by anOffset


 

convertAlignment


 

laySubpartsOutInOneRow


 

layoutChanged

The receiver's layout changed; inform above and below


  menu & halo top  
 

addCustomMenuItems:hand:

Add morph-specific menu itemns to the menu for the hand


 

addPenMenuItems:hand:

Add a pen-trails-within submenu to the given menu


 

addPenTrailsMenuItemsTo:

Add items relating to pen trails to aMenu


 

addPlayfieldMenuItems:hand:


 

addScalingMenuItems:hand:


 

addStackMenuItems:hand:

Add appropriate stack-related items to the given menu


 

addWorldHaloMenuItemsTo:hand:

Add standard halo items to the menu, given that the receiver is a World


 

addWorldToggleItemsToHaloMenu:

Add toggle items for the world to the halo menu


 

autoExpansionString

Answer the string to be shown in a menu to represent the auto-phrase-expansion status


 

autoLineLayoutString

Answer the string to be shown in a menu to represent the auto-line-layout status


 

autoViewingString

Answer the string to be shown in a menu to represent the automatic-viewing status


 

batchPenTrailsString

Answer the string to be shown in a menu to represent the batch-pen-trails enabled status


 

buildDebugMenu:

Answer a debugging menu for the receiver. The hand argument is seemingly historical and plays no role presently


 

defersHaloOnClickTo:

If a cmd-click on aSubMorph would make it a preferred recipient of the halo, answer true


 

defineApplicationView


 

defineFactoryView


 

deleteBalloonTarget:

Delete the balloon help targeting the given morph


 

fenceEnabledString

Answer the string to be shown in a menu to represent the fence enabled status


 

indicateCursorString

Answer the string to be shown in a menu to represent the whether-to-indicate-cursor status


 

isOpenForDragNDropString

Answer the string to be shown in a menu to represent the open-to-drag-n-drop status


 

isPartsBinString

Answer the string to be shown in a menu to represent the parts-bin status


 

mightEntertainDirectionHandles

Answer whether the receiver, by its very nature, might possibly be happy to have direction handles shown for it in its halo


 

mouseOverHalosString

Answer the string to be shown in a menu to represent the mouse-over-halos status


 

originAtCenterString

Answer the string to be shown in a menu to represent the origin-at-center status


 

playfieldOptionsMenu

Answer an auxiliary menu with options specific to playfields -- too many to be housed in the main menu


 

presentCardAndStackMenu

Put up a menu holding card/stack-related options.


 

presentPlayfieldMenu


 

presentViewMenu

Answer an auxiliary menu with options specific to viewing playfields -- this is put up from the provisional 'view' halo handle, on pasteup morphs only.


 

reformulateUpdatingMenus

Give any updating menu morphs in the receiver a fresh kiss of life


 

saveOnFile

Ask the user for a filename and save myself on a SmartReferenceStream file. Writes out the version and class structure. The file is fileIn-able. UniClasses will be filed out.


 

showApplicationView


 

showExpandedView

the transform


 

showFactoryView


 

showFullView


 

showReducedView


 

showThumbnailString

Answer the string to be shown in a menu to represent the show-thumbnails status


 

transformToShow:


 

wantsDirectionHandles


 

wantsHaloFor:

Answer whether the receiver wishes for a mouse-over halo to be produced for aSubMorph


 

wantsHaloFromClick


  misc top  
 

abandonCostumeHistory


 

allScriptEditors


 

allScriptors

Answer a list of all active scriptors running on behalf of the receiver. This is a hook used in past demos and with a future life which however presently is vacuous


 

alwaysShowThumbnail


 

cachedOrNewThumbnailFrom:

If I have a cached thumbnail, and it is of the desired extent, then ruturn it.
Otherwise produce one in newThumbnail and return it (after caching).
This code parallels what happens in page: to match resultant extent.


 

cartesianOrigin


 

closedViewerFlapTabs

Answer all the viewer flap tabs in receiver that are closed


 

containsCard:

Answer whether the given card belongs to the uniclass representing the receiver


 

demandsBoolean

Sent by some scripting objects to their container


 

heightForThumbnails


 

hideFlapsOtherThan:ifClingingTo:

Hide flaps on the given edge unless they are the given one


 

hideViewerFlaps


 

hideViewerFlapsOtherThanFor:


 

impartPrivatePresenter


 

innocuousName

Choose an innocuous name for the receiver -- one that does not end in the word Morph


 

invalidRect:from:

Clip damage reports to my bounds, since drawing is clipped to my bounds.


 

isPlayfieldLike


 

makeDetachable


 

maxHeightToAvoidThumbnailing


 

maximumThumbnailWidth


 

mouseX


 

mouseY


 

nameForCopyIfAlreadyNamed:

Answer a name to set for a copy of aMorph if aMorph itself is named, else nil


 

padding:


 

position:

Prevent moving a world (e.g. via HandMorph>>specialGesture:)


 

prepareToBeSaved

Prepare this morph to be saved to disk. Subclasses should nil out any instance variables that holds state that should not be saved, such as cached Forms. Note that this operation may take more drastic measures than releaseCachedState; for example, it might discard the transcript of an interactive chat session.


 

presenter

Normally only the world will have a presenter, but the architecture supports individual localized presenters as well


 

residesInPartsBin

Answer true if the receiver is, or has some ancestor owner who is, a parts bin


 

roundUpStrays


 

shouldGetStepsFrom:


 

smallThumbnailForPageSorter


 

startRunningAll

Start running all scripted morphs. Triggered by user hitting GO button


 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


 

stepAll

tick all the paused player scripts in the receiver


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


 

stopRunningAll

Reset all ticking scripts to be paused. Triggered by user hitting STOP button


 

thumbnailForPageSorter


 

unhideHiddenObjects


 

updateStatusForAllScriptEditors


 

viewerFlapTabFor:

Open up a Viewer on aMorph in its own flap, creating it if necessary


 

wantsKeyboardFocusFor:

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


  model top  
 

createCustomModel

Create a model object for this world if it does not yet have one. A model object is an initially empty subclass of MorphicModel. As the user names parts and adds behavior, instance variables and methods are added to this class.


 

model

Return the model object for this world. If the world has no model, then create one.


 

modelOrNil

Return the model object for this world, or nil if it doesn't have one.


 

setModel:

Set the model for this world. Methods for sensitized morphs will be compiled into the class for this model.


  naming top  
 

defaultNameStemForInstances

Answer a basis for names of default instances of the receiver


  object fileIn top  
 

convertToCurrentVersion:refStream:

transition from project to worldState (8/16/1999)


  options top  
 

autoLineLayout


 

autoLineLayout:

Make the receiver be viewed with auto-line-layout, which means that its submorphs will be laid out left-to-right and then top-to-bottom in the manner of a word processor, or (if aBoolean is false,) cease applying auto-line-layout


 

automaticViewing:


 

batchPenTrails

Answer whether pen trails should be batched in the receiver


 

batchPenTrails:


 

becomeLikeAHolder


 

behaveLikeAHolderString

Answer a string to be displayed in a menu to characterize whether the receiver is currently behaving like a holder


 

behaveLikeHolder


 

behaveLikeHolder:

Change the receiver's viewing properties such that they conform to what we commonly call a Holder, viz: resize-to-fit, do auto-line-layout, and indicate the 'cursor'


 

behavingLikeAHolder

Answer whether the receiver is currently behaving like a Holder


 

fenceEnabled

in case a non-pasteUp is used as a container


 

fenceEnabled:


 

indicateCursor


 

indicateCursor:


 

isPartsBin


 

isPartsBin:


 

replaceTallSubmorphsByThumbnails

Any submorphs that seem to tall get replaced by thumbnails; their balloon text is copied over to the thumbnail


 

resizeToFit


 

resizeToFitString

Answer a string, to be used in a self-updating menu, to represent whether the receiver is currently using resize-to-fit or not


 

setPartsBinStatusTo:


 

setThumbnailHeight


 

toggleAlwaysShowThumbnail


 

toggleAutoLineLayout

Toggle the auto-line-layout setting


 

toggleAutomaticPhraseExpansion


 

toggleAutomaticViewing


 

toggleBatchPenTrails


 

toggleBehaveLikeAHolder

Toggle whether or not the receiver is currently behaving like a holder


 

toggleFenceEnabled


 

toggleIndicateCursor


 

toggleIsPartsBin

Not entirely happy with the openToDragNDrop not being directly manipulable etc, but still living with it for now.


 

toggleMouseOverHalos


 

toggleOriginAtCenter


 

toggleResizeToFit

Toggle whether the receiver is set to resize-to-fit


 

updateSubmorphThumbnails


 

wantsMouseOverHalos


 

wantsMouseOverHalos:


  painting top  
 

backgroundSketch


 

backgroundSketch:

Set the receiver's background graphic as indicated. If nil is supplied, remove any existing background graphic. In any case, delete any preexisting background graphic.


 

deleteBackgroundPainting


 

makeNewDrawingWithin

Start a painting session in my interior which will result in a new SketchMorph being created as one of my submorphs


 

paintBackground


 

paintingBoundsAround:

Return a rectangle for painting centered on the given point. Both the argument point and the result rectangle are in world coordinates.


 

prepareToPaint

We're about to start painting. Do a few preparations that make the system more responsive.


 

prepareToPaint:

We're about to start painting. Do a few preparations that make the system more responsive.


 

reasonablePaintingExtent


  pen top  
 

addImageToPenTrailsFor:

The turtleTrailsForm is created on demand when the first pen is put down and removed (to save space) when turtle trails are cleared.


 

arrowheadsOnAllPens


 

clearTurtleTrails


 

createOrResizeTrailsForm

If necessary, create a new turtleTrailsForm or resize the existing one to fill my bounds. On return, turtleTrailsForm exists and is the correct size.


 

drawPenTrailFor:from:to:

Draw a pen trail for aMorph, using its pen state (the pen is assumed to be down).


 

liftAllPens


 

lowerAllPens


 

noArrowheadsOnAllPens


 

noteNewLocation:forPlayer:

Note that a morph has just moved with its pen down, begining at startPoint.
Only used in conjunction with Preferences batchPenTrails.


 

notePenDown:forPlayer:at:

Note that a morph has just moved with its pen down, begining at startPoint.
Only used in conjunction with Preferences batchPenTrails.


 

trailMorph

Yes, you can draw trails on me.


 

updateTrailsForm

Update the turtle-trails form using the current positions of all pens.
Only used in conjunction with Preferences batchPenTrails.


  private top  
 

morphicLayerNumber

helpful for insuring some morphs always appear in front of or behind others.
smaller numbers are in front


 

privateFullMoveBy:

Private. Overridden to prevent drawing turtle trails when a playfield is moved


  project top  
 

project

Find the project that owns me. Not efficient to call this.


 

releaseSqueakPages

If this world has a book with SqueakPages, then clear the SqueakPageCache


 

storeProjectsAsSegments

Force my sub-projects out to disk


  project state top  
 

activeHand


 

canvas


 

firstHand


 

hands


 

handsDo:


 

isStepping:


 

isStepping:selector:


 

listOfSteppingMorphs


 

modelWakeUp

I am the model of a SystemWindow, that has just been activated


 

stepListSize


 

stepListSummary


 

steppingMorphsNotInWorld


 

viewBox

This tortured workaround arises from a situation encountered in which a PasteUpMorph was directliy lodged as a submorph of another PasteUpMorph of identical size, with the former bearing flaps but the latter being the world


 

viewBox:

I am now displayed within newViewBox; react.


  scripting top  
 

abandonOldReferenceScheme

Perform a one-time changeover


 

allTileScriptingElements

Answer a list of all the morphs that pertain to tile-scripting. A sledge-hammer


 

currentVocabulary

Answer the default Vocabulary object to be applied when scripting


 

currentVocabularyFor:

Answer the Vocabulary object to be applied when scripting an object in the world.


 

hideAllPlayers


 

isCandidateForAutomaticViewing

A viewer on a world is a dangerous thing to get casually!


 

modernizeBJProject

Prepare a kids' project from the BJ fork of September 2000 -- a once-off thing for converting such projects forward to a modern 3.1a image, in July 2001. Except for the #enableOnlyGlobalFlapsWithIDs: call, this could conceivably be called upon reloading *any* project, just for safety.


 

recreateScripts

self currentWorld recreateScripts.


 

relaunchAllViewers

Relaunch all the viewers in the project


 

scriptorForTextualScript:ofPlayer:


 

showAllPlayers


  stepping top  
 

cleanseStepList

Remove morphs from the step list that are not in this World. Often were in a flap that has moved on to another world.


 

runLocalStepMethods


 

runStepMethods


 

startStepping:

Add the given morph to the step list. Do nothing if it is already being stepped.


 

startStepping:at:selector:arguments:stepTime:


 

stopStepping:

Remove the given morph from the step list.


 

stopStepping:selector:

Remove the given morph from the step list.


  submorphs-accessing top  
 

morphsInFrontOf:overlapping:do:

Include hands if the receiver is the World


  submorphs-add/remove top  
 

addMorphFront:


 

addMorphInLayer:


  undo top  
 

clearCommandHistory


 

commandHistory

Return the command history for the receiver


  update cycle top  
 

startBackgroundProcess

Start a process to update this world in the background. Return the process created.


  viewing top  
 

addViewingItemsTo:

Add viewing-related items to the given menu. If any are added, this method is also responsible for adding a line after them


 

imposeListViewSortingBy:retrieving:

Establish a list view of the receiver's contents, sorting the contents by the criterion represented by sortOrderSymbol, and displaying readouts as indicated by the list of field selectors.


 

restoreBoundsOfSubmorphs

restores the saved xy-positions and extents


 

saveBoundsOfSubmorphs

store the current xy-positions and extents of submorphs for future use


 

scriptSelectorToTriggerFor:

Answer a new selector which will bear the code for aButtonMorph in the receiver


 

showingListView

Answer whether the receiver is currently showing a list view


 

sortSubmorphsBy:

Sort the receiver's submorphs by the criterion indicated in the provided symbol


 

viewByIcon

The receiver has been being viewed in some constrained layout view; now restore it to its normal x-y-layout view


 

viewByName

Make the receiver show its subparts as a vertical list of lines of information, sorted by object name


 

viewBySize

Make the receiver show its subparts as a vertical list of lines of information, sorted by object size


 

viewNonOverlapping

Make the receiver show its contents as full-size morphs laid out left-to-right and top-to-bottom to be non-overlapping.


 

viewingByIconString

Answer a string to show in a menu representing whether the receiver is currently viewing its subparts by icon or not


 

viewingByNameString

Answer a string to show in a menu representing whether the receiver is currently viewing its subparts by name or not


 

viewingBySizeString

Answer a string to show in a menu representing whether the receiver is currently viewing its subparts by size or not


 

viewingNonOverlappingString

Answer a string to show in a menu representing whether the receiver is currently viewing its subparts by non-overlapping-icon (aka auto-line-layout)


 

viewingNormally

Answer whether the receiver is being viewed normally, viz not in list-view or auto-line-layout


  world menu top  
 

activateObjectsTool

Offer the user a parts bin of morphs -- if one already exists, bring it to the front and flash its border beckoningly; if none exists yet, create a new one and place it in the center of the screen


 

addUndoItemsTo:

Add undo-related items to the given menu. Will add zero, one or two items, depending on the settings of the #useUndo and #infiniteUndo preferences


 

bringWindowsFullOnscreen

Make ever SystemWindow on the desktop be totally on-screen, whenever possible.


 

buildWorldMenu:


 

closeUnchangedWindows

Present a menu of window titles for all windows with changes,
and activate the one that gets chosen.


 

collapseAll

Collapse all windows


 

collapseNonWindows


 

connectRemoteUser


 

connectRemoteUserWithName:picture:andIPAddress:

Prompt for the initials to be used to identify the cursor of a remote user, then create a cursor for that user and wait for a connection.


 

deleteNonWindows


 

detachableScriptingSpace


 

disconnectAllRemoteUsers

Disconnect all remote hands and stop transmitting events.


 

disconnectRemoteUser

Prompt for the initials of the remote user, then remove the remote hand with those initials, breaking its connection.


 

drawingClass


 

expandAll

Expand all windows


 

extractScreenRegion:andPutSketchInHand:

The user has specified a polygonal area of the Display.
Now capture the pixels from that region, and put in the hand as a Sketch.


 

findAChangeSorter:

Locate a change sorter, open it, and bring it to the front. Create one if necessary. Only works in morphic, initially, probably


 

findAMessageNamesWindow:

Locate a MessageNames tool, open it, and bring it to the front. Create one if necessary


 

findAPreferencesPanel:

Locate a Preferences Panel, open it, and bring it to the front. Create one if necessary


 

findATranscript:

Locate a transcript, open it, and bring it to the front. Create one if necessary


 

findDirtyBrowsers:

Present a menu of window titles for browsers with changes,
and activate the one that gets chosen.


 

findDirtyWindows:

Present a menu of window titles for all windows with changes,
and activate the one that gets chosen.


 

findWindow:

Present a menu names of windows and naked morphs, and activate the one that gets chosen. Collapsed windows appear below line, expand if chosen; naked morphs appear below second line; if any of them has been given an explicit name, that is what's shown, else the class-name of the morph shows; if a naked morph is chosen, bring it to front and have it don a halo.


 

getWorldMenu:


 

grabDrawingFromScreen:

Allow the user to specify a rectangular area of the Display, capture the pixels from that area, and use them to create a new drawing morph. Attach the result to the hand.


 

grabFloodFromScreen:

Allow the user to plant a flood seed on the Display, and create a new drawing morph from the resulting region. Attach the result to the hand.


 

grabLassoFromScreen:

Allow the user to specify a polygonal area of the Display, capture the pixels from that area, and use them to create a new drawing morph. Attach the result to the hand.


 

grabRubberBandFromScreen:

Allow the user to specify a polygonal area of the Display, capture the pixels from that area, and use them to create a new drawing morph. Attach the result to the hand.


 

invokeWorldMenu:

Put up the world menu, triggered by the passed-in event. But don't do it if the eToyFriendly preference is set to true.


 

keystrokeInWorld:

A keystroke was hit when no keyboard focus was in set, so it is sent here to the world instead. This current implementation is regrettably hard-coded; until someone cleans this up, you may wish to edit this method to suit your personal taste in interpreting cmd-keys issued to the desktop.


 

makeNewDrawing:


 

makeNewDrawing:at:


 

newDrawingFromMenu:


 

openRecentSubmissionsBrowser:

Locate a recent-submissions browser, open it, and bring it to the front. Create one if necessary. Only works in morphic


 

openScrapsBook:

Open up the Scraps book in the center of the screen


 

printScriptSummary

Put up a window with summaries of all scripts in the world


 

putUpDesktopMenu:

Put up the desktop menu


 

putUpWorldMenu:

Put up a menu in response to a click on the desktop, triggered by evt.


 

putUpWorldMenuFromEscapeKey


 

removeAllViewers

Delete all the viewers lined up along my right margin.


 

reportLocalAddress

Report the local host address of this computer.


 

showStatusOfAllScripts

Put up a window that shows, and allows you to change, the status of all scripts


 

yellowButtonClickOnDesktopWithEvent:

Put up either the personalized menu or the world menu when the user clicks on the morphic desktop with the yellow button. The preference 'personalizedWorldMenu' governs which one is used


  world state top  
 

abandonAllHalos


 

abandonVocabularyPreference

Remove any memory of a preferred vocabulary in the project


 

activeHand:

temporarily retained for old main event loops


 

addAllMorphs:


 

addHand:

Add the given hand to the list of hands for this world.


 

addMorph:centeredNear:

Add the given morph to this world, attempting to keep its center as close to the given point possible while also keeping the it entirely within the bounds of this world.


 

addMorphsAndModel:

Dump in submorphs, model, and stepList from aMorphOrList. Used to bring a world, paste-up, or other morph in from an object file.


 

allMorphsDo:

Enumerate all morphs in the world, including those held in hands.


 

allNonFlapRelatedSubmorphs

Answer all non-window submorphs that are not flap-related


 

assureNotPaintingElse:

If painting is already underway in the receiver, put up an informer to that effect and evalute aBlock


 

assureNotPaintingEvent:

If painting is already underway
in the receiver, put up an informer to that effect and evalute aBlock


 

assuredCanvas


 

beWorldForProject:


 

checkCurrentHandForObjectToPaste


 

checkCurrentHandForObjectToPaste2


 

chooseClickTarget


 

colorAt:belowMorph:

Return the color of the pixel immediately behind the given morph at the given point.
NOTE: due to some bounds wobble in flexing, we take the middle of 3x3 rect.


 

currentNaturalLanguage

Answer the natural language symbol of the current project's natural language


 

deEmphasizeViewMVC:


 

deleteAllHalos


 

displayWorld


 

displayWorldAsTwoTone

Display the world in living black-and-white. (This is typically done to save space.)


 

displayWorldNonIncrementally

Display the morph world non-incrementally. Used for testing.


 

displayWorldSafely


 

doOneCycle


 

doOneCycleInBackground


 

doOneSubCycle

Like doOneCycle, but preserves activeHand.


 

dragThroughOnDesktop:

Draw out a selection rectangle


 

embeddedProjectDisplayMode

#naked - the embedded project/world is just a pasteup in the outer p/w
#window - the embedded p/w is in a system window in the outer p/w
#frame - the embedded p/w is in a green frame and clipped
#scaled - the embedded p/w is in a green frame and scaled to fit


 

endDrawing:

If painting is already underway
in the receiver, finish and save it.


 

exit


 

extent:


 

flashRects:color:

For testing. Flashes the given list of rectangles on the Display so you can watch incremental redisplay at work.


 

fullContainsPoint:

The world clips its children


 

fullRepaintNeeded


 

goBack


 

haloMorphOrNil


 

haloMorphs


 

handleFatalDrawingError:

Handle a fatal drawing error.


 

initForProject:


 

install


 

installAsActiveSubprojectIn:at:titled:


 

installAsActiveSubprojectIn:titled:


 

installFlaps

Get flaps installed within the bounds of the receiver


 

installVectorVocabulary

Install the experimental Vector vocabulary as the default for the current project


 

jumpToProject


 

nextPage

backstop for smart next-page buttons that look up the containment hierarchy until they find somone who is willing to field this command. If we get here, the 'next' button was not embedded in a book, so we can do nothing useful


 

open

Open a view on this WorldMorph.


 

openWithTitle:cautionOnClose:

Open a view on this WorldMorph with the given title.


 

optimumExtentFromAuthor


 

paintArea

What rectangle should the user be allowed to create a new painting in?? An area beside the paintBox. Allow playArea to override with its own bounds!


 

paintAreaFor:

Answer the area to comprise the onion-skinned canvas for painting/repainting aSketchMorph


 

paintBox

Return the painting controls widget (PaintBoxMorph) to be used for painting in this world. If there is not already a PaintBox morph, or if it has been deleted from this world, create a new one.


 

paintBoxOrNil

Return the painting controls widget (PaintBoxMorph) to be used for painting in this world. If there is not already a PaintBox morph return nil


 

patchAt:without:andNothingAbove:

Return a complete rendering of this patch of the display screen
without stopMorph, and possibly without anything above it.


 

pauseEventRecorder

Suspend any event recorder, and return it if found


 

previousPage

backstop for smartprev-page buttons that look up the containment hierarchy until they find somone who is willing to field this command. If we get here, the button was not embedded in a book, so we can do nothing useful


 

privateMoveBy:

Private! Use 'position:' instead.


 

privateOuterDisplayWorld


 

referencePlayfield

Answer a pasteup morph to be used as the reference for cartesian coordinates


 

removeHand:

Remove the given hand from the list of hands for this world.


 

repairEmbeddedWorlds


 

repositionFlapsAfterScreenSizeChange

Reposition flaps after screen size change


 

restoreDisplay


 

restoreFlapsDisplay

Restore the display of flaps


 

restoreMorphicDisplay


 

saveAsWorld


 

sketchEditorOrNil

Return a SketchEditorMorph found in the world, if any, else nil


 

sleep


 

someHalo

Return some halo that's currently visible in the world


 

specialNameInModelFor:


 

standardPlayerHit


 

standardSystemController


 

startSteppingSubmorphsOf:

Ensure that all submorphs of the given morph that want to be stepped are added to the step list. Typically used after adding a morph to the world.


 

triggerClosingScripts

If the receiver has any scripts set to run on closing, run them now


 

triggerOpeningScripts

If the receiver has any scripts set to run on opening, run them now


 

veryDeepCopyWith:

See storeDataOn:


class methods
  project top  
 

MinCycleLapse:

set the minimum amount of time that may transpire between two calls to doOneCycle


 

disableDeferredUpdates


 

disableDeferredUpdates:

If the argument is true, disable deferred screen updating.


 

initialize

WorldMorph initialize


 

newWorldForProject:

Return a new pasteUpMorph configured as a world (ie project notNil).
projectOrNil is no longer used.


 

newWorldTesting


 

shutDown

This message is sent on system shutdown to registered classes


 

startUp

This message is sent to registered classes when the system is coming up.


  scripting top  
 

additionsToViewerCategories

Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.


 

authoringPrototype

Answer an instance of the receiver suitable for placing in a parts bin for authors


 

defaultNameStemForInstances

Answer a basis for names of default instances of the receiver


 

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!


 

supplementaryPartsDescriptions

Answer a list of DescriptionForPartsBin objects that characterize objects that this class wishes to contribute to Stationery bins *other* than by the standard default #newStandAlone protocol