Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.106.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.106 Author: mt Time: 30 March 2015, 9:54:42.858 am UUID: f3c5f60f-b54f-b044-ab99-a27c5d2f03a4 Ancestors: ToolBuilder-Morphic-mt.105 Draw the balloon text in a pluggable text morph if no content is present. Revert the #helpText thing. See ToolBuilder-Kernel-mt.72. =============== Diff against ToolBuilder-Morphic-mt.105 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildHelpFor:spec: (in category 'pluggable widgets') ----- buildHelpFor: widget spec: aSpec + aSpec help ifNotNil: [:stringOrSymbol | + stringOrSymbol isSymbol + ifTrue: [widget balloonTextSelector: stringOrSymbol] + ifFalse: [widget balloonText: stringOrSymbol]].! - aSpec help - ifNotNil: [widget setBalloonText: aSpec help]! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableInputField: (in category 'pluggable widgets') ----- buildPluggableInputField: aSpec | widget | widget := self buildPluggableText: aSpec. widget acceptOnCR: true. widget hideScrollBarsIndefinitely. - widget getHelpTextSelector: aSpec helpText. ^widget! Item was changed: PluggableTextMorph subclass: #PluggableTextMorphPlus + instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler' - instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler getHelpTextSelector' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTextMorphPlus commentStamp: 'ar 2/11/2005 21:53' prior: 0! A pluggable text morph with support for color.! Item was added: + ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- + drawBalloonTextOn: aCanvas + "Show balloon text in the text morph if it has no contents." + + textMorph contents ifNotEmpty: [^ self]. + + self balloonText ifNotNil: [:text | + aCanvas + drawString: text + at: self innerBounds topLeft + (5@2) + font: textMorph textStyle defaultFont + color: (Color gray: 0.7)].! Item was removed: - ----- Method: PluggableTextMorphPlus>>drawHelpTextOn: (in category 'drawing') ----- - drawHelpTextOn: aCanvas - - | helpText | - - (self getHelpTextSelector notNil and: [textMorph contents isEmpty]) - ifFalse: [^ self]. - - helpText := self getHelpTextSelector isSymbol - ifTrue: [self model perform: self getHelpTextSelector] - ifFalse: [self getHelpTextSelector]. - helpText ifNil: [^ self]. - - aCanvas - drawString: helpText - at: self innerBounds topLeft + (5@2) - font: textMorph textStyle defaultFont - color: (Color gray: 0.7).! Item was changed: ----- Method: PluggableTextMorphPlus>>drawOn: (in category 'drawing') ----- drawOn: aCanvas super drawOn: aCanvas. + self drawBalloonTextOn: aCanvas.! - self drawHelpTextOn: aCanvas.! Item was removed: - ----- Method: PluggableTextMorphPlus>>getHelpTextSelector (in category 'accessing') ----- - getHelpTextSelector - - ^ getHelpTextSelector! Item was removed: - ----- Method: PluggableTextMorphPlus>>getHelpTextSelector: (in category 'accessing') ----- - getHelpTextSelector: aSymbol - - getHelpTextSelector := aSymbol.! |
Free forum by Nabble | Edit this page |