'From Squeak3.1alpha of 28 February 2001 [latest update: #3880] on 26 March 2001 at 4:24:56 pm'! "Change Set: worldViewer-sw Date: 26 March 2001 Author: Scott Wallace For a Viewer on a World, enables more categories and many more commands. Also, fixes a bug that had broken the functioning of the #initiatePainting command last fall."! !PasteUpMorph methodsFor: 'painting' stamp: 'sw 3/24/2001 23:58'! makeNewDrawingWithin "Start a painting session in my interior which will result in a new SketchMorph being created as one of my submorphs" | evt | evt _ MouseEvent new setType: nil position: self center buttons: 0 hand: self world activeHand. self makeNewDrawing: evt! ! !Player methodsFor: 'slots-kernel' stamp: 'sw 3/24/2001 23:29'! categoriesForWorld "Answer the list of categories given that the receiver is the Player representing a World" | aList | aList _ #(#'color & border' #'pen trails' playfield collections #'stack navigation') asOrderedCollection. self class scripts size > 0 ifTrue: [aList addFirst: #scripts]. self slotNames size > 0 ifTrue: [aList addFirst: #'instance variables']. ^ aList! ! !Player methodsFor: 'slots-kernel' stamp: 'sw 3/26/2001 16:23'! usableMethodInterfacesIn: methodInterfaceList "Filter the list given by methodInterfaceList, to remove items inappropriate to the receiver" self hasCostumeThatIsAWorld ifTrue: [^ methodInterfaceList select: [:anInterface | #(append: beep: clearTurtleTrails getColor "color" getCursor "cursor" deleteCard doMenuItem emptyScript firstPage goToFirstCardInBackground goToFirstCardOfStack goToLastCardInBackground goToLastCardOfStack goToNextCardInStack goToPreviousCardInStack initiatePainting insertCard liftAllPens lowerAllPens getMouseX getMouseY "mouseX mouseY" pauseScript: reverse roundUpStrays shuffleContents startScript: stopScript: unhideHiddenObjects getValueAtCursor "valueAtCursor") includes: anInterface selector]]. self hasAnyBorderedCostumes ifTrue: [^ methodInterfaceList]. ^ self hasOnlySketchCostumes ifTrue: [methodInterfaceList select: [:anInterface | (#(getColor getBorderColor getBorderWidth) includes: anInterface selector) not]] ifFalse: [methodInterfaceList select: [:anInterface | (#(getBorderColor getBorderWidth) includes: anInterface selector) not]]! !