The Trunk: Morphic-mt.1031.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1031.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1031.mcz

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

Name: Morphic-mt.1031
Author: mt
Time: 6 November 2015, 12:07:42.757 pm
UUID: f57fc346-7087-4d9d-80ad-96e53674bdd1
Ancestors: Morphic-mt.1030

Let all kinds of pluggable lists have customizable balloon helps.

=============== Diff against Morphic-mt.1030 ===============

Item was changed:
  ScrollPane subclass: #PluggableListMorph
+ instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow hoverRow listMorph hScrollRangeCache keystrokePreviewSelector priorSelection getIconSelector getHelpSelector'
- instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow hoverRow listMorph hScrollRangeCache keystrokePreviewSelector priorSelection getIconSelector'
  classVariableNames: 'ClearFilterAutomatically FilterableLists HighlightHoveredRow MenuRequestUpdatesSelection'
  poolDictionaries: ''
  category: 'Morphic-Pluggable Widgets'!
 
  !PluggableListMorph commentStamp: 'cmm 8/21/2011 23:37' 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 (if FilterableLists is false).
 
  Special keys (up, down, home, etc.) are also supported.!

Item was added:
+ ----- Method: PluggableListMorph>>balloonText (in category 'accessing') -----
+ balloonText
+ "Overridden to send selector to model and not self. Do not use #perform:orSendTo: because super does more than just the send.."
+
+ self getHelpSelector ifNotNil: [:selector |
+ ((self model respondsTo: selector) and: [self hoverRow > 0]) ifTrue: [
+ ^ self model perform: selector with: (self modelIndexFor: self hoverRow)]].
+
+ ^ super balloonText!

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

Item was added:
+ ----- Method: PluggableListMorph>>getHelpSelector: (in category 'accessing') -----
+ getHelpSelector: aSelector
+ "Get help for list entries."
+
+ getHelpSelector := aSelector.!

Item was changed:
  ----- Method: PluggableListMorph>>hoverRow: (in category 'accessing') -----
  hoverRow: anInteger
 
  hoverRow = anInteger ifTrue: [^ self].
 
  hoverRow ifNotNil: [self listMorph rowChanged: hoverRow].
  hoverRow := anInteger.
+ hoverRow ifNotNil: [self listMorph rowChanged: hoverRow].
+
+ self wantsBalloon ifTrue: [
+ self activeHand
+ removePendingBalloonFor: self;
+ triggerBalloonFor: self after: self balloonHelpDelayTime].!
- hoverRow ifNotNil: [self listMorph rowChanged: hoverRow].!