'From Cuis 5.0 [latest update: #4024] on 9 March 2020 at 2:35:28 pm'!

!IndentingListItemMorph methodsFor: 'accessing' stamp: 'jmv 3/9/2020 14:30:33'!
beFullyExpandedAsPer: aBlock levels: n
	"But no more than n levels"

	| allChildren |
	n > 0 ifFalse: [
		^self ].
	allChildren _ OrderedCollection new: 10.
	self recursiveAddTo: allChildren.
	allChildren do:
		[:each |
			| shouldExpandEach |
			shouldExpandEach := each canExpand and: [aBlock value: each].
			shouldExpandEach ~= each isExpanded ifTrue:
				[
					each toggleExpandedState.
					each beFullyExpandedAsPer: aBlock levels: n - 1
				]
		]! !


!IndentingListItemMorph methodsFor: 'accessing' stamp: 'jmv 3/9/2020 14:33:58'!
beFullyExpandedAsPer: aBlock

	self beFullyExpandedAsPer: aBlock levels: 3! !

