Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.2107.mcz
==================== Summary ====================
Name: Morphic-mt.2107 Author: mt Time: 17 April 2023, 4:06:28.838908 pm UUID: 478a1971-c2da-7341-badf-ca64163a8c22 Ancestors: Morphic-mt.2106
In tree widgets, have the selected index quickly available to enumerate submorphs around the current selection efficiently.
=============== Diff against Morphic-mt.2106 ===============
Item was changed: ScrollPane subclass: #SimpleHierarchicalListMorph + instanceVariableNames: 'selectedMorph selectedMorphIndex hoveredMorph getListSelector keystrokeActionSelector autoDeselect autoExpand autoExpandSelector columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor font textColor' - instanceVariableNames: 'selectedMorph hoveredMorph getListSelector keystrokeActionSelector autoDeselect autoExpand autoExpandSelector columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor font textColor' classVariableNames: 'ExpandAllLimit ExpandedForm NotExpandedForm WrappedNavigation' poolDictionaries: '' category: 'Morphic-Explorer'!
!SimpleHierarchicalListMorph commentStamp: 'ls 3/1/2004 12:15' prior: 0! Display a hierarchical list of items. Each item should be wrapped with a ListItemWrapper.
For a simple example, look at submorphsExample. For beefier examples, look at ObjectExplorer or FileList2.!
Item was changed: ----- Method: SimpleHierarchicalListMorph>>adjustSubmorphPositions (in category 'private') ----- adjustSubmorphPositions
| p | p := 0@0. scroller submorphsDo: [ :each | | h | each visible ifTrue: [ h := each height. each privateBounds: (p extent: self preferredSubmorphWidth@h). p := p + (0@h) ]]. scroller layoutChanged. + selectedMorphIndex := nil. "to catch all collapse/expand events" self clearColumnsCache; changed; layoutChanged; setScrollDeltas. !
Item was changed: ----- Method: SimpleHierarchicalListMorph>>getSelectionIndex (in category 'keyboard navigation') ----- getSelectionIndex + ^ selectedMorphIndex ifNil: [selectedMorphIndex := scroller submorphs indexOf: selectedMorph]! - ^scroller submorphs indexOf: selectedMorph!
Item was changed: ----- Method: SimpleHierarchicalListMorph>>selectedMorph: (in category 'selection') ----- selectedMorph: aMorph
self unhighlightSelection. selectedMorph := aMorph. + selectedMorphIndex := nil. self highlightSelection. self scrollSelectionIntoView.!
packages@lists.squeakfoundation.org