The Trunk: ToolBuilder-Morphic-mt.108.mcz

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

The Trunk: ToolBuilder-Morphic-mt.108.mcz

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

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

Name: ToolBuilder-Morphic-mt.108
Author: mt
Time: 31 March 2015, 6:01:50.569 pm
UUID: 790df11a-d082-fa48-a59d-43eeffc5c092
Ancestors: ToolBuilder-Morphic-mt.107

Support added for list item-specific balloon help. (Similar to the one in tree morphs.)

=============== Diff against ToolBuilder-Morphic-mt.107 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableList: (in category 'pluggable widgets') -----
  buildPluggableList: aSpec
  | widget listClass getIndex setIndex |
  aSpec getSelected ifNil:[
  listClass := self listClass.
  getIndex := aSpec getIndex.
  setIndex := aSpec setIndex.
  ] ifNotNil:[
  listClass := self listByItemClass.
  getIndex := aSpec getSelected.
  setIndex := aSpec setSelected.
  ].
  widget := listClass on: aSpec model
  list: aSpec list
  selected: getIndex
  changeSelected: setIndex
  menu: aSpec menu
  keystroke: aSpec keyPress.
  self register: widget id: aSpec name.
  widget getListElementSelector: aSpec listItem.
  widget getListSizeSelector: aSpec listSize.
  widget getIconSelector: aSpec icon.
+ widget getHelpSelector: aSpec help.
  widget doubleClickSelector: aSpec doubleClick.
  widget dragItemSelector: aSpec dragItem.
  widget dropItemSelector: aSpec dropItem.
  widget wantsDropSelector: aSpec dropAccept.
  widget autoDeselect: aSpec autoDeselect.
  widget keystrokePreviewSelector: aSpec keystrokePreview.
  aSpec color isNil
  ifTrue: [widget
  borderWidth: 1;
  borderColor: Color lightGray;
  color: Color white]
  ifFalse: [widget color: aSpec color].
- self buildHelpFor: widget spec: aSpec.
  self setFrame: aSpec frame in: widget.
  parent ifNotNil:[self add: widget to: parent].
  panes ifNotNil:[
  aSpec list ifNotNil:[panes add: aSpec list].
  ].
  ^widget!

Item was changed:
  PluggableListMorph subclass: #PluggableListMorphPlus
+ instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector getHelpSelector'
- instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'ToolBuilder-Morphic'!
 
  !PluggableListMorphPlus commentStamp: 'ar 7/15/2005 11:10' prior: 0!
  Extensions for PluggableListMorph needed by ToolBuilder!

Item was added:
+ ----- Method: PluggableListMorphPlus>>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 hoverRow]].
+
+ ^ super balloonText!

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

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

Item was added:
+ ----- Method: PluggableListMorphPlus>>hoverRow: (in category 'accessing') -----
+ hoverRow: anInteger
+
+ self hoverRow ~= anInteger ifTrue: [
+ super hoverRow: anInteger.
+ self wantsBalloon ifTrue: [
+ self activeHand
+ removePendingBalloonFor: self;
+ triggerBalloonFor: self after: self balloonHelpDelayTime]].
+
+ !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ToolBuilder-Morphic-mt.108.mcz

marcel.taeumel (old)
You can try it out by loading the attached change set. This will add source code previews to the message list in the system browser:



Here is the changeset: browser-help.cs

Best,
Marcel