Patrick Rein uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-pre.194.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-pre.194 Author: pre Time: 15 May 2017, 9:36:39.991328 pm UUID: a559fcce-f05d-6044-ba8f-67a103756188 Ancestors: ToolBuilder-Morphic-topa.193
Adds double click capabilities to PluggableTreeMorph
=============== Diff against ToolBuilder-Morphic-topa.193 ===============
Item was changed: SimpleHierarchicalListMorph subclass: #PluggableTreeMorph + instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector dragTypeSelector nodeClass lastKeystrokeTime lastKeystrokes dragStartedSelector doubleClickSelector' - instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector dragTypeSelector nodeClass lastKeystrokeTime lastKeystrokes dragStartedSelector' classVariableNames: 'FilterByLabelsOnly MaximumSearchDepth' poolDictionaries: '' category: 'ToolBuilder-Morphic'!
!PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! A pluggable tree morph.!
Item was added: + ----- Method: PluggableTreeMorph>>doubleClick: (in category 'event handling') ----- + doubleClick: evt + + | aMorph | + aMorph := self itemFromPoint: evt position. + self model perform: self doubleClickSelector with: aMorph withoutListWrapper + !
Item was added: + ----- Method: PluggableTreeMorph>>doubleClickEnabled (in category 'accessing') ----- + doubleClickEnabled + + ^ self doubleClickSelector notNil!
Item was added: + ----- Method: PluggableTreeMorph>>doubleClickSelector (in category 'accessing') ----- + doubleClickSelector + + ^ doubleClickSelector!
Item was added: + ----- Method: PluggableTreeMorph>>doubleClickSelector: (in category 'accessing') ----- + doubleClickSelector: anObject + + doubleClickSelector := anObject!
Item was added: + ----- Method: PluggableTreeMorph>>mouseDown: (in category 'event handling') ----- + mouseDown: evt + | aMorph selectors | + + aMorph := self itemFromPoint: evt position. + evt yellowButtonPressed "First check for option (menu) click" + ifTrue: [ + (PluggableListMorph menuRequestUpdatesSelection and: [model okToChange]) ifTrue: [ + aMorph == selectedMorph + ifFalse: [self setSelectedMorph: aMorph]]. + ^ self yellowButtonActivity: evt shiftPressed]. + (aMorph notNil and:[aMorph inToggleArea: (aMorph point: evt position from: self)]) + ifTrue:[^self toggleExpandedState: aMorph event: evt]. + aMorph ifNil:[^super mouseDown: evt]. + + aMorph highlightForMouseDown. + self setProperty: #highlightedMorph toValue: aMorph. + + selectors := Array + with: #click: + with: (self doubleClickEnabled ifTrue: [#doubleClick:] ifFalse: [nil]) + with: nil + with: (self dragEnabled ifTrue:[#startDrag:] ifFalse:[nil]). + evt hand waitForClicksOrDrag: self event: evt selectors: selectors threshold: HandMorph dragThreshold "pixels".!
packages@lists.squeakfoundation.org