'From Squeak3.2alpha of 2 October 2001 [latest update: #4562] on 29 November 2001 at 8:03:45 pm'! "Change Set: ToggleDirectionHandles-ar Date: 29 November 2001 Author: Andreas Raab Makes the direction handles option a per-morph on/off preference. Only stores its value if the morph goes against the system wide pref."! !Morph methodsFor: 'menus' stamp: 'ar 11/29/2001 19:57'! addToggleItemsToHaloMenu: aMenu "Add standard true/false-checkbox items to the memu" #((resistsRemovalString toggleResistsRemoval 'whether I should be reistant to easy removal from my container via the pink X handle') (stickinessString toggleStickiness 'whether I should be resistant to a drag done by mousing down on me') (lockedString lockUnlockMorph 'when "locked", I am inert to all user interactions') (hasClipSubmorphsString changeClipSubmorphs 'whether the parts of objects within me that are outside my bounds should be masked.') (hasDirectionHandlesString changeDirectionHandles 'whether direction handles are shown with the halo') (hasDragAndDropEnabledString changeDragAndDrop 'whether I am open to have objects dropped into me')) do: [:trip | aMenu addUpdating: trip first action: trip second. aMenu balloonTextForLastItem: trip third]. self couldHaveRoundedCorners ifTrue: [aMenu addUpdating: #roundedCornersString action: #toggleCornerRounding. aMenu balloonTextForLastItem: 'whether my corners should be rounded']! ! !Morph methodsFor: 'menus' stamp: 'ar 11/29/2001 19:57'! changeDirectionHandles ^self wantsDirectionHandles: self wantsDirectionHandles not! ! !Morph methodsFor: 'menus' stamp: 'ar 11/29/2001 19:58'! hasDirectionHandlesString ^(self wantsDirectionHandles ifTrue:[''] ifFalse:['']), 'direction handles'! ! !Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:50'! wantsDirectionHandles ^self valueOfProperty: #wantsDirectionHandles ifAbsent:[Preferences showDirectionHandles]! ! !Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:52'! wantsDirectionHandles: aBool aBool == Preferences showDirectionHandles ifTrue:[self removeProperty: #wantsDirectionHandles] ifFalse:[self setProperty: #wantsDirectionHandles toValue: aBool]. ! ! !HaloMorph methodsFor: 'private' stamp: 'ar 11/29/2001 20:01'! doMenu: evt with: menuHandle "Ask hand to invoke the halo menu for my inner target." | menu | self obtainHaloForEvent: evt andRemoveAllHandlesBut: nil. self world displayWorld. menu _ innerTarget buildHandleMenu: evt hand. innerTarget addTitleForHaloMenu: menu. menu popUpEvent: evt in: self world. ! ! !SketchMorph methodsFor: 'menu' stamp: 'ar 11/29/2001 19:51'! wantsDirectionHandles ^self valueOfProperty: #wantsDirectionHandles ifAbsent:[ Preferences showDirectionHandles or:[Preferences showDirectionForSketches]]! ! !SketchMorph methodsFor: 'menu' stamp: 'ar 11/29/2001 19:52'! wantsDirectionHandles: aBool aBool == (Preferences showDirectionHandles or:[Preferences showDirectionForSketches]) ifTrue:[self removeProperty: #wantsDirectionHandles] ifFalse:[self setProperty: #wantsDirectionHandles toValue: aBool].! !