[squeak-dev] The Trunk: Morphic-cmm.382.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 15 23:59:10 UTC 2010


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.382.mcz

==================== Summary ====================

Name: Morphic-cmm.382
Author: cmm
Time: 15 March 2010, 6:57:34.936 pm
UUID: bd939abb-a9c8-4df7-bf99-40b21796a4d6
Ancestors: Morphic-ul.381, Morphic-MAD.381

- Integrated new ListChooser from Michael Davies.

=============== Diff against Morphic-ul.381 ===============

Item was changed:
  ScrollPane subclass: #PluggableListMorph
+ 	instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow listMorph hScrollRangeCache keystrokePreviewSelector'
- 	instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow listMorph hScrollRangeCache'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Pluggable Widgets'!
  
  !PluggableListMorph commentStamp: '<historical>' prior: 0!
  ...
  
  When a PluggableListMorph is in focus, type in a letter (or several
  letters quickly) to go to the next item that begins with that letter.
  Special keys (up, down, home, etc.) are also supported.!

Item was added:
+ ----- Method: PluggableListMorph>>keystrokePreviewSelector: (in category 'selection') -----
+ keystrokePreviewSelector: sel
+ 	"The method on the model that will be given first view of any keystroke events.  For access via scripting"
+ 
+ 	keystrokePreviewSelector := sel!

Item was added:
+ ----- Method: PluggableListMorph>>previewKeystroke: (in category 'model access') -----
+ previewKeystroke: event
+ 	"Let the model decide if it's going to handle the event for us"
+ 
+ 	^ keystrokePreviewSelector 
+ 		ifNil: [ false ]
+ 		ifNotNil: [ model perform: keystrokePreviewSelector with: event ]!

Item was added:
+ ----- Method: PluggableListMorph>>keystrokePreviewSelector (in category 'selection') -----
+ keystrokePreviewSelector
+ 	^ keystrokePreviewSelector!

Item was changed:
  ----- Method: PluggableListMorph>>keyStroke: (in category 'event handling') -----
  keyStroke: event 
  	"Process keys 
+ 	The model is allowed to preview all keystrokes. If it's not interested:
  	specialKeys are things like up, down, etc. ALWAYS HANDLED 
  	modifierKeys are regular characters either 1) accompanied with ctrl, 
  	cmd or 2) any character if the list doesn't want to handle basic 
  	keys (handlesBasicKeys returns false) 
  	basicKeys are any characters"
  	| aChar aSpecialKey |
+ 	(self previewKeystroke: event) ifTrue: [ ^ self ].
  	(self scrollByKeyboard: event) ifTrue: [^self].
  	aChar := event keyCharacter.
  	aSpecialKey := aChar asciiValue.
  	aSpecialKey < 32 ifTrue: [^ self specialKeyPressed: aSpecialKey].
  	(event anyModifierKeyPressed or: [self handlesBasicKeys not])
  		ifTrue: [^ self modifierKeyPressed: aChar].
  	^ self basicKeyPressed: aChar!




More information about the Squeak-dev mailing list