8982a0cb0243 — Gerald Klix (speedy) 1 year, 3 months ago
SUM: Removed a leftover.
1 files changed, 0 insertions(+), 272 deletions(-)

R haver/ui/DNDForIndentingListItemMorph.pck.st => 
R haver/ui/DNDForIndentingListItemMorph.pck.st =>  +0 -272
@@ 1,272 0,0 @@ 
-'From Cuis 5.0 [latest update: #4464] on 21 November 2020 at 7:58:37 pm'!
-'Description '!
-!provides: 'DNDForIndentingListItemMorph' 1 5!
-SystemOrganization addCategory: 'DNDForIndentingListItemMorph'!
-
-
-!classDefinition: (Environments>>#KlgDND>>#DNDDraggingGuideMorph) category: 'DNDForIndentingListItemMorph'!
-DraggingGuideMorph subclass: #DNDDraggingGuideMorph
-	instanceVariableNames: 'item'
-	classVariableNames: ''
-	poolDictionaries: ''
-	category: 'DNDForIndentingListItemMorph'
-	inEnvironment: #KlgDND!
-!classDefinition: (Environments>>#KlgDND>>#DNDDraggingGuideMorph) class category: 'DNDForIndentingListItemMorph'!
-(Environments>>#KlgDND>>#DNDDraggingGuideMorph) class
-	instanceVariableNames: ''!
-
-!classDefinition: (Environments>>#KlgDND>>#DNDInnerHierarchicalListMorph) category: 'DNDForIndentingListItemMorph'!
-InnerHierarchicalListMorph subclass: #DNDInnerHierarchicalListMorph
-	instanceVariableNames: ''
-	classVariableNames: ''
-	poolDictionaries: ''
-	category: 'DNDForIndentingListItemMorph'
-	inEnvironment: #KlgDND!
-!classDefinition: (Environments>>#KlgDND>>#DNDInnerHierarchicalListMorph) class category: 'DNDForIndentingListItemMorph'!
-(Environments>>#KlgDND>>#DNDInnerHierarchicalListMorph) class
-	instanceVariableNames: ''!
-
-!classDefinition: (Environments>>#KlgDND>>#DNDIndentingListItemMorph) category: 'DNDForIndentingListItemMorph'!
-IndentingListItemMorph subclass: #DNDIndentingListItemMorph
-	instanceVariableNames: ''
-	classVariableNames: ''
-	poolDictionaries: ''
-	category: 'DNDForIndentingListItemMorph'
-	inEnvironment: #KlgDND!
-!classDefinition: (Environments>>#KlgDND>>#DNDIndentingListItemMorph) class category: 'DNDForIndentingListItemMorph'!
-(Environments>>#KlgDND>>#DNDIndentingListItemMorph) class
-	instanceVariableNames: ''!
-
-!classDefinition: (Environments>>#KlgDND>>#DNDHierarchicalListMorph) category: 'DNDForIndentingListItemMorph'!
-HierarchicalListMorph subclass: #DNDHierarchicalListMorph
-	instanceVariableNames: 'dropSelector dropCheckSelector'
-	classVariableNames: ''
-	poolDictionaries: ''
-	category: 'DNDForIndentingListItemMorph'
-	inEnvironment: #KlgDND!
-!classDefinition: (Environments>>#KlgDND>>#DNDHierarchicalListMorph) class category: 'DNDForIndentingListItemMorph'!
-(Environments>>#KlgDND>>#DNDHierarchicalListMorph) class
-	instanceVariableNames: ''!
-
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) commentStamp: '<historical>' prior: 0!
-I am an adapted dragging guide morph.!
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) commentStamp: '<historical>' prior: 0!
-I am a HierarchicalListMorph that allows drag and drop.!
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'initialization' stamp: 'KLG 11/20/2020 11:36:20'!
-defaultColor
-
-	^ Theme current background alpha: 0.5! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'testing' stamp: 'KLG 11/20/2020 18:18:12'!
-is: aSymbol
-
-	^aSymbol == #DNDDraggingGuideMorph or: [ super is: aSymbol ]! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'accessing' stamp: 'KLG 11/20/2020 18:17:00'!
-item
-	"Answer the value of item"
-
-	^ item! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'accessing' stamp: 'KLG 11/20/2020 18:16:50'!
-item: anObject
-	"Set the value of item"
-
-	self assert: item isNil.
-	item _ anObject! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/20/2020 18:46:27'!
-rejectDropMorphEvent: aDropEvent
-	"The receiver has been rejected, and must be put back somewhere.
-	 If the original owner and position are known, use them, 
-	else Just keep it in the hand"
-
-	self delete.
-	aDropEvent hand redrawNeeded.
-	aDropEvent contents flash.! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/21/2020 16:36:53'!
-wantsToBeDroppedInto: aMorph
-	"Return true if it's okay to drop the receiver into aMorph. This check is symmetric to #wantsDroppedMorph:event: to give both parties a chance of figuring out whether they like each other."
-	
-	^ aMorph is: #DNDIndentingListItemMorph :: or: [
-		aMorph is: #DNDHierarchicalListMorph ]! !
-
-!(Environments>>#KlgDND>>#DNDDraggingGuideMorph) class methodsFor: 'instance creation' stamp: 'KLG 11/20/2020 18:16:34'!
-for: anItem
-	"Create a new instance for anItem."
-
-	^ self new item: anItem! !
-
-!(Environments>>#KlgDND>>#DNDInnerHierarchicalListMorph) methodsFor: 'testing' stamp: 'KLG 11/21/2020 16:34:49'!
-is: aSymbol
-
-	^aSymbol == #DNDInnerHierarchicalListMorph or: [ super is: aSymbol ]! !
-
-!(Environments>>#KlgDND>>#DNDIndentingListItemMorph) methodsFor: 'event handling testing' stamp: 'KLG 11/20/2020 16:51:31'!
-allowsMorphDrop
-	"Answer whether we accept dropping morphs. By default answer true."
-
-	"Use a property test to allow individual instances to specify this."
-	^ self valueOfProperty: #allowsMorphDrop ifAbsent: [ true ]! !
-
-!(Environments>>#KlgDND>>#DNDIndentingListItemMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/20/2020 18:56:55'!
-acceptDroppingMorph: aGuideMorph event: evt
-	"This message is sent when a morph is dropped onto a morph that has agreed to accept the dropped morph by responding 'true' to the wantsDroppedMorph:event: message. This default implementation just adds the given morph to the receiver."
-	
-	[ complexContents acceptDraggedItem: aGuideMorph item ]
-		onDNU: #acceptDraggedItem:
-		do:  [ ]! !
-
-!(Environments>>#KlgDND>>#DNDIndentingListItemMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/20/2020 18:14:22'!
-dragEvent: aMouseEvent localPosition: localEventPosition
-
-	| dragged sm |
-	"F: self listMorph highlightedRow: nil."
-	sm _ LabelMorph contents: complexContents asString.
-	sm color: Theme current text.
-	dragged _ DNDDraggingGuideMorph for: complexContents.
-	dragged addMorph: sm.
-	dragged morphExtent: sm morphExtent.
-	dragged setProperty: #dragItem toValue: complexContents.
-	aMouseEvent hand attachMorphBeside: dragged.
-	^ dragged.! !
-
-!(Environments>>#KlgDND>>#DNDIndentingListItemMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/20/2020 18:20:31'!
-wantsDroppedMorph: aMorph event: evt
-	"Return true if the receiver wishes to accept the given morph, which is being dropped by a hand in response to the given event. Note that for a successful drop operation both parties need to agree. The symmetric check is done automatically via aMorph wantsToBeDroppedInto: self."
-
-	^ aMorph is: #DNDDraggingGuideMorph :: and: [ complexContents wantsDroppedObject: aMorph item ]! !
-
-!(Environments>>#KlgDND>>#DNDIndentingListItemMorph) methodsFor: 'testing' stamp: 'KLG 11/20/2020 18:48:47'!
-is: aSymbol
-
-	^ aSymbol == #DNDIndentingListItemMorph or: [ super is: aSymbol ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'initialization' stamp: 'KLG 11/20/2020 10:39:00'!
-indentingItemClass
-	"Answer the morphs class that holds the items."
-	
-	^ DNDIndentingListItemMorph! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'initialization' stamp: 'KLG 11/20/2020 10:29:58'!
-innerMorphClass
-	"Answer the morph class for the inner morph."
-
-	^ DNDInnerHierarchicalListMorph! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'initialization' stamp: 'KLG 11/21/2020 19:45:23'!
-model: anObject listGetter: getListSel indexGetter: getSelectionSel indexSetter: setSelectionSel mainView: aMainView menuGetter: getMenuSel keystrokeAction: keyActionSel dropAction: dropActionSel dropChecker: dropCheckSel
-	"Initialize all the callbacks."
-
-	super
-		model: anObject
-		listGetter: getListSel
-		indexGetter: getSelectionSel
-		indexSetter: setSelectionSel
-		mainView: aMainView
-		menuGetter: getMenuSel
-		keystrokeAction: keyActionSel.
-	dropSelector _ dropActionSel.
-	dropCheckSelector _ dropCheckSel ! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/21/2020 16:51:35'!
-acceptDroppingMorph: aGuideMorph event: evt
-	"This message is sent when a morph is dropped onto a morph that has agreed to accept the dropped morph by responding 'true' to the wantsDroppedMorph:event: message. This default implementation just adds the given morph to the receiver."
-	
-	dropSelector ifNotNil: [ model perform: dropSelector with: aGuideMorph item ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/20/2020 16:54:25'!
-dragEvent: aMouseEvent localPosition: aPosition
-	"We have drag; delegate it to the item at aPosition."
-	
-	self itemFromPoint: aPosition :: ifNotNil: [ :item |
-		^ item dragEvent: aMouseEvent localPosition: aPosition ].
-	aMouseEvent wasHandled: true! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'dropping/grabbing' stamp: 'KLG 11/21/2020 19:43:16'!
-wantsDroppedMorph: aMorph event: evt
-	"Return true if the receiver wishes to accept the given morph, which is being dropped by a hand in response to the given event. Note that for a successful drop operation both parties need to agree. The symmetric check is done automatically via aMorph wantsToBeDroppedInto: self."
-
-	^ aMorph is: #DNDDraggingGuideMorph :: 
-		and: [ dropSelector notNil ]
-		and: [ dropCheckSelector 
-				ifNil: [ true ] 
-				ifNotNil: 	[ :checker | model perform: checker with: aMorph item ] ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'events' stamp: 'KLG 11/20/2020 18:05:59'!
-mouseButton1Down: aMouseButtonEvent localPosition: localEventPosition
-
-	| itemMorph |
-	aMouseButtonEvent hand newKeyboardFocus: self.
-	itemMorph _ self itemFromPoint: localEventPosition.
-	itemMorph ifNil: [ ^super mouseButton1Down: aMouseButtonEvent localPosition: localEventPosition ].
-	self highlightedMorph: itemMorph.
-	(itemMorph inToggleArea: (itemMorph internalize: (scroller internalize: localEventPosition)))
-		ifTrue: [ ^self toggleExpandedState: itemMorph event: aMouseButtonEvent ]. 
-	aMouseButtonEvent hand 
-		waitForClicksOrDragOrSimulatedMouseButton2: self 
-		event: aMouseButtonEvent 
-		clkSel: #click:localPosition:
-		clkNHalf: nil
-		dblClkSel: (doubleClickSelector ifNotNil: [ #doubleClick:localPosition: ])
-		dblClkNHalfSel: nil
-		tripleClkSel: nil
-		dragSel: (self allowsItemDrag ifTrue: [ #dragEvent:localPosition: ])! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'event handling testing' stamp: 'KLG 11/20/2020 18:04:00'!
-allowsItemDrag
-	"Answer true if my items are draggable."
-	
-	^ self valueOfProperty: #allowsItemDrag ifAbsent: [ true ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'event handling testing' stamp: 'KLG 11/20/2020 18:05:26'!
-allowsItemDrag: aBoolean
-	"Set the item drag property."
-	
-	^ self setProperty: #allowsItemDrag toValue: aBoolean! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'event handling testing' stamp: 'KLG 11/21/2020 16:41:41'!
-allowsMorphDrop
-	"Answer whether we accept dropping morphs. By default answer true."
-
-	"Use a property test to allow individual instances to specify this."
-	^ self valueOfProperty: #allowsMorphDrop ifAbsent: [ true ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) methodsFor: 'testing' stamp: 'KLG 11/21/2020 16:37:57'!
-is: aSymbol
-
-	^aSymbol == #DNDHierarchicalListMorph or: [ super is: aSymbol ]! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) class methodsFor: 'instance creation' stamp: 'KLG 11/21/2020 19:46:51'!
-model: anObject listGetter: getListSel indexGetter: getSelectionSel indexSetter: setSelectionSel mainView: aMainView menuGetter: getMenuSel keystrokeAction: keyActionSel dropAction: dropActionSel
-	"Create a 'pluggable' list view on the given model parameterized by the given message selectors."
-
-	^ self new
-		model: anObject
-		listGetter: getListSel
-		indexGetter: getSelectionSel
-		indexSetter: setSelectionSel
-		mainView: aMainView
-		menuGetter: getMenuSel
-		keystrokeAction: keyActionSel
-		dropAction: dropActionSel
-		dropChecker: nil.! !
-
-!(Environments>>#KlgDND>>#DNDHierarchicalListMorph) class methodsFor: 'instance creation' stamp: 'KLG 11/21/2020 19:47:20'!
-model: anObject listGetter: getListSel indexGetter: getSelectionSel indexSetter: setSelectionSel mainView: aMainView menuGetter: getMenuSel keystrokeAction: keyActionSel dropAction: dropActionSel dropChecker: dropCheckSel
-	"Create a 'pluggable' list view on the given model parameterized by the given message selectors."
-
-	^ self new
-		model: anObject
-		listGetter: getListSel
-		indexGetter: getSelectionSel
-		indexSetter: setSelectionSel
-		mainView: aMainView
-		menuGetter: getMenuSel
-		keystrokeAction: keyActionSel
-		dropAction: dropActionSel
-		dropChecker: dropCheckSel.! !