'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 27 April 2003 at 6:13:10 pm'! "Change Set: skins-for-irc Date: 13 April 2003 Author: Stephan B. Wessels SM Name: skins add-on for enhanced IRC This change set applies patches to the Enhanced IRC client allowing it to utilize the Skins II modifications. The code in this change set may be included in the enhanced irc client base set since this change set makes no explicit references to Skins II based code. Date Update ------------- ----------------------------------------------------------------------------------- 13-apr-2003 Modified to work either with or without Skins II installed. 07-apr-2003 Initial release. " ! !PluggableListMorphSpecialHighlighting methodsFor: 'as yet unclassified' stamp: 'sbw 4/13/2003 18:01'! highlightSelection "Do nothing to the text." "scroller submorphs inspect." | skin useSkin colorChoice | false ifFalse: [^ nil]. selectedMorph ifNotNil: [ skin _ nil. skin _ (Smalltalk includesKey: #ImportedSkin) ifTrue: [self owner perform: #skinToUse]. useSkin _ skin isNil not and: [(Preferences perform: #skinListBoxes) and: [colorChoice _ skin perform: #colorListBoxSelectionText. colorChoice isNil not]]. self highlightSpecificMorph: selectedMorph color: (useSkin ifTrue: [colorChoice] ifFalse: [Color red])]! ! !PluggableListMorphSpecialHighlighting methodsFor: 'as yet unclassified' stamp: 'sbw 4/13/2003 17:56'! list: listOfStrings "Set the receiver's list as specified" "sbw - special handling. If the list contains StringMorphs use them as-is." | morphList h loc index converter item aSelector | scroller removeAllMorphs. list _ listOfStrings ifNil: [Array new]. list isEmpty ifTrue: [self setScrollDeltas. ^ self selectedMorph: nil]. "NOTE: we will want a quick StringMorph init message, possibly even combined with event install and positioning" font ifNil: [font _ Preferences standardListFont]. converter _ self valueOfProperty: #itemConversionMethod. converter ifNil: [converter _ #asStringOrText]. morphList _ list collect: [:each | item _ each. item isStringMorph ifFalse: [item _ item perform: converter]. item isText ifTrue: [StringMorph contents: item font: font emphasis: (item emphasisAt: 1)] ifFalse: [item isStringMorph ifTrue: [item] ifFalse: [StringMorph contents: item font: font]]]. (aSelector _ self valueOfProperty: #balloonTextSelectorForSubMorphs) ifNotNil: [morphList do: [:m | m balloonTextSelector: aSelector]]. self highlightSelector ifNotNil: [model perform: self highlightSelector with: list with: morphList]. "Lay items out vertically and install them in the scroller" h _ morphList first height. "self listItemHeight" loc _ 0 @ 0. morphList do: [:m | m bounds: (loc extent: 9999 @ h). loc _ loc + (0 @ h)]. scroller addAllMorphs: morphList. index _ self getCurrentSelectionIndex. self selectedMorph: ((index = 0 or: [index > morphList size]) ifFalse: [morphList at: index]). self setScrollDeltas. scrollBar setValue: 0.0. "The following line of code enables us to work both with and without Skins II." (Smalltalk includesKey: #ImportedSkin) ifTrue: [self perform: #setColorsFromSkin]! !