[squeak-dev] The Trunk: Morphic-mt.1580.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 23 08:50:34 UTC 2019
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1580.mcz
==================== Summary ====================
Name: Morphic-mt.1580
Author: mt
Time: 23 October 2019, 10:50:24.634796 am
UUID: a8ef9dad-6359-47b0-84c7-fc316b7374dd
Ancestors: Morphic-mt.1579
Deprecates MulticolumnLazyListMorph because PluggableMultiColumnListMorph uses the regular LazyListMorph by now.
=============== Diff against Morphic-mt.1579 ===============
Item was removed:
- LazyListMorph subclass: #MulticolumnLazyListMorph
- instanceVariableNames: 'columnWidths'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Morphic-Widgets'!
-
- !MulticolumnLazyListMorph commentStamp: '<historical>' prior: 0!
- A variant of LazyListMorph that can display multi-column lists.!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>display:atRow:on: (in category 'drawing') -----
- display: items atRow: row on: canvas
- "display the specified item, which is on the specified row; for Multicolumn
- lists, items will be a list of strings"
- | drawBounds |
- drawBounds := (self drawBoundsForRow: row) translateBy: (self hMargin @ 0).
- drawBounds := drawBounds intersect: self bounds.
- items
- with: (1 to: items size)
- do: [:item :index |
- "move the bounds to the right at each step"
- index > 1
- ifTrue: [drawBounds := drawBounds left: drawBounds left + 6
- + (columnWidths at: index - 1)].
- item isText
- ifTrue: [canvas
- drawString: item
- in: drawBounds
- font: (font
- emphasized: (item emphasisAt: 1))
- color: (self colorForRow: row)]
- ifFalse: [canvas
- drawString: item
- in: drawBounds
- font: font
- color: (self colorForRow: row)]]!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>drawOn: (in category 'drawing') -----
- drawOn: aCanvas
- self getListSize = 0 ifTrue:[ ^self ].
-
- self setColumnWidthsFor: aCanvas.
-
- super drawOn: aCanvas!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>getListItem: (in category 'list access') -----
- getListItem: index
- ^listSource getListItem: index!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>listChanged (in category 'list management') -----
- listChanged
- columnWidths := nil.
- super listChanged!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>setColumnWidthsFor: (in category 'drawing') -----
- setColumnWidthsFor: aCanvas
- | row topRow bottomRow |
- "set columnWidths for drawing on the specified canvas"
- columnWidths ifNil: [
- columnWidths := (self item: 1) collect: [ :ignored | 0 ]. ].
- topRow := (self topVisibleRowForCanvas: aCanvas) max: 1.
- bottomRow := (self bottomVisibleRowForCanvas: aCanvas) max: 1.
- topRow > bottomRow ifTrue: [ ^ self ].
- topRow to: bottomRow do: [ :rowIndex |
- row := self item: rowIndex.
- columnWidths := columnWidths with: row collect: [ :currentWidth :item |
- | widthOfItem |
- widthOfItem := (font widthOfStringOrText: item).
- widthOfItem > currentWidth
- ifTrue: [ self changed. widthOfItem ]
- ifFalse: [ currentWidth ] ] ]!
Item was removed:
- ----- Method: MulticolumnLazyListMorph>>widthToDisplayItem: (in category 'scroll range') -----
- widthToDisplayItem: item
- | widths |
- widths := item collect: [ :each | super widthToDisplayItem: each ].
- ^widths sum + (10 * (widths size - 1)) "add in space between the columns"
- !
More information about the Squeak-dev
mailing list
|