'From etoys2.1 of 26 July 2007 [latest update: #1556] on 16 August 2007 at 10:06:29 pm'! "Change Set: editBalloonText-sw Date: 16 August 2007 Author: Scott Wallace TRAC 2826 - Move the edit-balloon-text command from the debug menu to the extras menu, thus making it available to all users. Formerly it had only been available to users who had the eToyFriendly flag turned off."! !Morph methodsFor: 'debug and other' stamp: 'sw 8/16/2007 12:06'! buildDebugMenu: aHand "Answer a debugging menu for the receiver. The hand argument is seemingly historical and plays no role presently" | aMenu aPlayer aModel | aMenu _ MenuMorph new defaultTarget: self. aMenu addStayUpItem. (self hasProperty: #errorOnDraw) ifTrue: [aMenu add: 'start drawing again' translated action: #resumeAfterDrawError. aMenu addLine]. (self hasProperty: #errorOnStep) ifTrue: [aMenu add: 'start stepping again' translated action: #resumeAfterStepError. aMenu addLine]. aMenu add: 'inspect morph' translated action: #inspectInMorphic:. aMenu add: 'explore morph' translated target: self selector: #explore. aMenu add: 'inspect properties' action: #inspectMorphsProperties. aMenu add: 'inspect owner chain' translated action: #inspectOwnerChain. Smalltalk isMorphic ifFalse: [aMenu add: 'inspect morph (in MVC)' translated action: #inspect]. (aModel _ self modelOrNil) ifNotNil: [aMenu addLine. aMenu add: 'inspect model' translated target: aModel action: #inspect. aMenu add: 'explore model' target: aModel action: #explore. aMenu add: 'model protocol' target: aModel action: #haveFullProtocolBrowsed]. (aPlayer _ self player) ifNotNil: [aMenu add: 'inspect player' translated target: aPlayer action: #inspect]. aMenu addLine. aPlayer ifNotNil: [aMenu add: 'viewer for Player' translated target: self player action: #beViewed. aMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan "View" halo handle' translated]. aMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly. aMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated. aMenu add: 'morph protocol' translated target: self selector: #haveFullProtocolBrowsed. aMenu addLine. self addViewingItemsTo: aMenu. aMenu add: 'make own subclass' translated action: #subclassMorph; add: 'internal name ' translated action: #choosePartName; add: 'save morph in file' translated action: #saveOnFile; addLine; add: 'control-menu...' translated target: self selector: #invokeMetaMenu:. ^ aMenu! ! !Morph methodsFor: 'menus' stamp: 'sw 8/16/2007 13:16'! addMiscExtrasTo: aMenu "Add a submenu of miscellaneous extra items to the menu." | realOwner realMorph subMenu | subMenu _ MenuMorph new defaultTarget: self. (Preferences eToyFriendly not and: [self isWorldMorph not and: [self renderedMorph isSystemWindow not]]) ifTrue: [subMenu add: 'put in a window' translated action: #embedInWindow]. self isWorldMorph ifFalse: [subMenu add: 'adhere to edge...' translated action: #adhereToEdge. subMenu addLine]. realOwner _ (realMorph _ self topRendererOrSelf) owner. (realOwner isKindOf: TextPlusPasteUpMorph) ifTrue: [subMenu add: 'GeeMail stuff...' translated subMenu: (realOwner textPlusMenuFor: realMorph)]. Preferences eToyFriendly ifFalse: [ subMenu add: 'add mouse up action' translated action: #addMouseUpAction; add: 'remove mouse up action' translated action: #removeMouseUpAction; add: 'hand me tiles to fire this button' translated action: #handMeTilesToFire. subMenu addLine. ]. Preferences eToyFriendly ifFalse: [ subMenu add: 'arrowheads on pen trails...' translated action: #setArrowheads. subMenu addLine. ]. subMenu defaultTarget: self topRendererOrSelf. (self isWorldMorph not and: [(self renderedMorph isSystemWindow) not]) ifTrue: [ subMenu add: 'draw new path' translated action: #definePath. subMenu add: 'follow existing path' translated action: #followPath. subMenu add: 'delete existing path' translated action: #deletePath. subMenu addLine. ]. self addGestureMenuItems: subMenu hand: ActiveHand. self isWorldMorph ifFalse: [subMenu add: 'balloon help for this object' translated action: #editBalloonHelpText]. subMenu submorphs isEmpty ifFalse: [ aMenu add: 'extras...' translated subMenu: subMenu ].! !