'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #387] on 15 January 2005 at 9:41:24 pm'! !Morph class methodsFor: 'scripting' stamp: 'tak 1/15/2005 21:39'! additionsToViewerCategoryMiscellaneous "Answer viewer additions for the 'miscellaneous' category" ^#( miscellaneous ( (command doMenuItem: 'do the menu item' Menu) (command show 'make the object visible') (command hide 'make the object invisible') (command wearCostumeOf: 'wear the costume of...' Player) (command fire 'trigger any and all of this object''s button actions') (slot copy 'returns a copy of this object' Player readOnly Player getNewClone unused unused) (slot elementNumber 'my index in my container' Number readWrite Player getIndexInOwner Player setIndexInOwner:) (slot holder 'the object''s container' Player readOnly Player getHolder Player setHolder:) (command stamp 'add my image to the pen trails') (command erase 'remove this object from the screen') (command stampAndErase 'add my image to the pen trails and go away') (slot player 'player' Player readWrite Player getPlayer Player setPlayer:) ) ) ! ! !Player methodsFor: 'player slot' stamp: 'tak 10/1/2003 22:14'! getPlayer ^ self class == UnscriptedPlayer ifTrue: [self] ifFalse: [self class allInstances first]! ! !Player methodsFor: 'player slot' stamp: 'tak 10/1/2003 01:45'! initializeCostumesFrom: aPlayer "Used to copy costume info over from an UnscriptedPlayer to a Player UniClass " costume _ aPlayer costume. costumes _ aPlayer costumes. self myDependents: aPlayer dependents. aPlayer breakDependents! ! !Player methodsFor: 'player slot' stamp: 'tak 10/1/2003 09:27'! setPlayer: aPlayer | newPlayer | newPlayer _ aPlayer copy. newPlayer initializeCostumesFrom: self. self costume player: newPlayer. StandardViewer allInstancesDo: [:each | each scriptedPlayer = self ifTrue: [each dismiss. self costume beViewed]]. Player allSubInstancesDo: [:each | each removeDependent: self]! ! !Player reorganize! ('accessing' presenter) ('card/stack commands' deleteCard firstPage getRoundedCorners goToCard: goToFirstCardInBackground goToFirstCardOfStack goToLastCardInBackground goToLastCardOfStack goToNextCardInStack goToPreviousCardInStack goto: insertCard lastPage nextPage previousPage setRoundedCorners:) ('copying' copyUniClassWith: veryDeepFixupWith: veryDeepInner:) ('costume' availableCostumeNames availableCostumesForArrows ceaseHavingAParameterFor: changeParameterTypeFor: clearOwnersPenTrails clearPenTrails costume costume: costumeRespondingTo: costumesDo: flipHorizontal flipVertical forgetOtherCostumes getValueFromCostume: hasAnyBorderedCostumes hasCostumeThatIsAWorld hasOnlySketchCostumes knownSketchCostumeWithSameFormAs: newCostume rawCostume: recaptureUniqueCostumes rememberCostume: renderedCostume: renderedCostume:remember: resetCostumeList restoreBaseGraphic sendMessageToCostume: sendMessageToCostume:with: setCostumeSlot:toValue: setParameterFor:toType: stamp stampAndErase startHavingParameterFor: tearOffButtonToFireScriptForSelector: typeforParameterFor: wearCostumeOf: wearCostumeOfClass: wearCostumeOfName:) ('error handling' doesNotUnderstand:) ('fileIn/Out' releaseCachedState) ('heading' headDown headLeft headRight headUp) ('macpal' isUniversalTiles slotInfo) ('menus' step) ('misc' actorState adoptScriptsFrom allOpenViewers allOpenViewersOnReceiverAndSiblings arrowDeltaFor: beNotZero: beRevealedInActiveWorld beep: browseEToyVocabulary browsePlayerClass color color:sees: decimalPlacesForGetter: dummy entryForPlayersTool: erase getIsOverColor: grabPlayerIn: grabPlayerInActiveWorld grabScriptorForSelector:in: impartSketchScripts indicateLocationOnScreen makeBounceSound: noteDecimalPlaces:forGetter: noteDeletionOf:fromWorld: offerAlternateViewerMenuFor:event: offerViewerMenuFor:event: openSearchingVocabularyBrowser openUnderlyingScriptorFor: ordinalNumber overlaps: revealPlayerIn: revertToUnscriptedPlayerIfAppropriate roundUpStrays seesColor: stack tearOffTileForSelf thumbnailMenuEvt:forMorph: tileReferringToSelf touchesA: unhideHiddenObjects uninstallFrom: unusedScriptName updateAllViewers updateAllViewersAndForceToShow: viewerFlapTab width) ('name' tryToRenameTo:) ('objects from disk' storeDataOn:) ('pen' addPlayerMenuItemsTo:hand: arrowheadsOnAllPens choosePenColor: choosePenSize clearTurtleTrails colorUnder defaultPenColor defaultPenSize getDotSize getPenArrowheads getPenColor getPenDown getPenSize getTrailStyle liftAllPens liftPen lowerAllPens lowerPen noArrowheadsOnAllPens penColor: setDotSize: setPenArrowheads: setPenColor: setPenDown: setPenSize: setTrailStyle: trailStyleForAllPens:) ('printing' printOn: stringForReadout) ('scripting' defaultFloatPrecisionFor: methodInterfacesForScriptsCategoryIn:) ('scripts-execution' assureEventHandlerRepresentsStatus assureNoScriptOtherThan:hasStatus: fireOnce prepareToBeRunning runAllClosingScripts runAllOpeningScripts runAllTickingScripts: scriptingError: startRunning startRunningScripts stepAt: stopProgramatically stopRunning) ('scripts-kernel' acceptScript:for: acceptableScriptNameFrom:forScriptCurrentlyNamed: addIdiosyncraticMenuItemsTo:forSlotSymol: allScriptEditors editDescriptionForSelector: emptyScript existingScriptInstantiationForSelector: expungeEmptyScripts expungeEmptyUnRenamedScripts hasScriptInvoking:ofPlayer: hasScriptReferencing:ofPlayer: infoFor:inViewer: instantiatedUserScriptsDo: isEmptyTileScript: isExpendableScript: makeIsolatedCodePaneForSelector: methodInterfaceForEmptyScript newTextualScriptorFor: noteRenameOf:to:inPlayer: okayToDestroyScriptNamed: okayToRemoveSlotNamed: pacifyScript: removeScript:fromWorld: removeScriptWithSelector: removeScriptWithoutUpdatingViewers: removeScriptWithoutUpdatingViewers:fromWorld: renameScript:newSelector: runScript: scriptEditorFor: scriptInstantiationForSelector: scriptorsForSelector:inWorld: slotInfoButtonHitFor:inViewer: sourceCodeFor: tilesToCall: universalTilesForInterface:) ('scripts-standard' append: assignStatus:toAllFor: bounce: changeScript:toStatus: clear contents contents: doButtonAction doMenuItem: doScript: fire followPath forward: getBackgroundColor getObtrudes goToRightOf: hide include: includeAtCursor: initiatePainting insertCharacters: insertContentsOf: loadSineWave loadSound: makeNewDrawingIn: menuItemAfter: menuItemBefore: moveToward: overlapsAny: pauseAll: pauseScript: performScriptIfCan: play prepend: removeAll reverse setBackgroundColor: show shuffleContents startAll: startScript: stopAll: stopScript: tellAllContents: tellAllSiblings: tellSelfAndAllSiblings: turn: turnToward: wrap) ('scripts-vector' * + - / asPoint decr: dividedBy: incr: multBy:) ('slot getters/setters' bookEmbodied cameraPoint cameraPoint: getActWhen getAllButFirstCharacter getAmount getAngle getBaseGraphic getBorderColor getBorderStyle getBorderWidth getBottom getBrightnessUnder getCameraPoint getCardNumber getCellInset getCharacterAtCursor getCharacters getClipSubmorphs getColor getColorUnder getConePosition getCostume getCostumeAtCursor getCount getCursor getCursorWrapped getDescending getDistance getDragEnabled getDropEnabled getDropShadow getFirstCharacter getFirstElement getGetListSelector getGraphic getGraphicAtCursor getHResizing getHeading getHeadingTheta getHeadingUnrounded getHeight getHolder getIndexInOwner getIsLocked getIsUnderMouse getKnobColor getLabel getLastCharacter getLastKeystroke getLastValue getLayoutInset getLeft getLeftRight getLength getListCentering getListDirection getLuminanceUnder getMaxVal getMinVal getMouseX getMouseY getName getNewClone getNumberAtCursor getNumericValue getOffsetX getOffsetY getPageNumber getPlayerAtCursor getPosition getRadialGradientFill getResistsRemoval getRight getRotationStyle getSampleAtCursor getSaturationUnder getScale getScaleFactor getSecondColor getShadowColor getSpeed getSticky getStringContents getSubtitlesFileName getTheta getTop getTruncate getUpDown getUseGradientFill getVResizing getValueAtCursor getVideoFileName getViewingByIcon getVolume getWidth getWrapDirection getX getY handTheUserACopy setActWhen: setAllButFirstCharacter: setBaseGraphic: setBorderColor: setBorderStyle: setBorderWidth: setBottom: setCameraPoint: setCardNumber: setCellInset: setCharacterAtCursor: setCharacters: setClipSubmorphs: setColor: setColorUnder: setConePosition: setCostume: setCursor: setCursorWrapped: setDescending: setDistance: setDragEnabled: setDropEnabled: setDropShadow: setFirstCharacter: setFirstElement: setGetListSelector: setGraphic: setHResizing: setHeading: setHeadingTheta: setHeight: setIndexInOwner: setIsLocked: setKnobColor: setLabel: setLastCharacter: setLastKeystroke: setLastValue: setLayoutInset: setLeft: setLength: setListCentering: setListDirection: setMaxVal: setMinVal: setName: setNumberAtCursor: setNumericValue: setOffsetX: setOffsetY: setPageNumber: setPosition: setRadialGradientFill: setResistsRemoval: setRight: setRotationStyle: setSampleAtCursor: setScale: setScaleFactor: setSecondColor: setShadowColor: setSticky: setSubtitlesFileName: setTheta: setTop: setTruncate: setUseGradientFill: setVResizing: setValueAtCursor: setVideoFileName: setViewingByIcon: setVolume: setWidth: setWrapDirection: setX: setY: stackEmbodied) ('slots-assignment' assignDecrGetter:setter:amt: assignGetter:setter:amt: assignIncrGetter:setter:amt: assignMultGetter:setter:amt:) ('slots-kernel' absorbBackgroundDataFrom:forInstanceVariables: categories categoriesForVocabulary: categoriesForWorld methodInterfacesForInstanceVariablesCategoryIn: slotNames typeForSlot: typeForSlot:vocabulary: typeForSlotWithGetter: usableMethodInterfacesIn:) ('slots-user' addInstanceVariable addInstanceVariableNamed:type:value: addSpecialSetter: chooseSlotTypeFor: chooseUserSlot compileInstVarAccessorsFor: defaultValueOfType: fancyWatcherFor: hasUserDefinedScripts initialValueForSlotOfType: offerGetterTiles: removeSlotNamed: renameSlot: renameSlot:newSlotName: setFloatPrecisionFor: setPrecisionFor: slotInfoAt: slotInfoAt:ifAbsent: slotInfoForGetter: slotNamesOfType: tearOffFancyWatcherFor: tearOffUnlabeledWatcherFor: tearOffWatcherFor: unlabeledWatcherFor: valueOfType:from:) ('slots-wonderland' getFogColor getFogDensity getFogRangeEnd getFogRangeStart getFogType setFogColor: setFogDensity: setFogRangeEnd: setFogRangeStart: setFogType:) ('testing' basicType costumes knownName nameForViewer renameTo: wantsSteps) ('user interface' defaultLabelForInspector) ('viewer' assureUniClass belongsToUniClass elementTypeFor:vocabulary: externalName graphicForViewerTab hasUserDefinedSlots initialTypeForSlotNamed: isPlayerLike newScriptorAround: renameScript: tileToRefer uniqueNameForReference) ('translation' allPossibleWatchersFromWorld labelFromWatcher: renameSlotInWatchersOld:new:) ('slots-world stethoscope' getDialNumber getFrequency getFrequency1 getFrequency2 getFrequency3 getLevel getLevel1 getLevel2 getLevel3 getListening getPitch setListening:) ('scripts-dialpad' dial:) ('scripts-world stethoscope' playSound: stopSound) ('slots-clock' getHours getMinutes getSeconds) ('slots-color' getAlpha getBlue getBrightness getGreen getHue getRed getSaturation setAlpha: setBlue: setBrightness: setGreen: setHue: setRed: setSaturation:) ('*ode-base-morph' getActive getBounce getBounceVel getDensity getGravity getOrientation getSoftCFM getVelocity setActive setActive: setBounce: setBounceVel: setDensity: setGravity: setOrientation: setSoftCFM: setVelocity:) ('player slot' getPlayer initializeCostumesFrom: setPlayer:) ('*morphic-example-var') ('*connectors-slot getters/setters' getAllowsConnectionToEmbeddedPins getDestinationArrowName getDestinationPlayer getDestinationX getDestinationY getHasPins getIncomingConnectionCount getLineWidth getMidpointX getMidpointY getOrthogonal getOutgoingConnectionCount getPinCount getRootOwner getSmoothCurve getSourceArrowName getSourcePlayer getSourceX getSourceY getTotalLength getWantsConnectionWhenEmbedded setAllowsConnectionToEmbeddedPins: setDestinationArrowName: setDestinationPlayer: setLineWidth: setOrthogonal: setSmoothCurve: setSourceArrowName: setSourcePlayer: setWantsConnectionWhenEmbedded:) ('playing commands' getCurrentFrameForm getFrameGraphic getIsRunning getRepeat getTotalFrames getTotalSeconds playUntilPosition: rewind setRepeat: stop totalFrames totalSeconds) ('*customevents-custom events' getTriggeringObject triggerCustomEvent: triggerScript:) ('*connectors-commands' addLabel: removeLabels straighten tellAllIncomingConnections: tellAllOutgoingConnections: tellAllPins: tellAllPredecessors: tellAllSuccessors:) ('*connectors-embeddings' createSlotFor: noteDeletionOfSubmorph:fromCostume: tellAllEmbeddedObjects:) ('*connectorstext-slot getters/setters' getTextFocus setTextFocus:) !