[squeak-dev] The Trunk: EToys-tpr.393.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon May 11 01:21:16 UTC 2020
tim Rowledge uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tpr.393.mcz
==================== Summary ====================
Name: EToys-tpr.393
Author: tpr
Time: 10 May 2020, 6:21:06.968561 pm
UUID: 24f8a1f3-bbb9-4730-8b60-2036d38db4d1
Ancestors: EToys-nice.392
Correct some abuses ofunderscore as assign
=============== Diff against EToys-nice.392 ===============
Item was changed:
----- Method: EToyExpressionTransformer>>reduceOnStack (in category 'all') -----
reduceOnStack
| list left sel right m |
list := stack removeLast: 3.
left := list at: 1.
sel := list at: 2.
right := list at: 3.
+ m := MessageNode new
- m _ MessageNode new
receiver: left
selector: sel
arguments: (Array with: right)
precedence: (sel precedence)
from: encoder
sourceRange: nil.
stack addLast: m.
!
Item was changed:
----- Method: InteriorFlapTab>>mouseMove: (in category 'event handling') -----
mouseMove: evt
"Handle a mouseMove event in the flap tab."
| aPosition newReferentThickness adjustedPosition thick relativePosition |
dragged ifFalse: [(thick := self referentThickness) > 0
ifTrue: [lastReferentThickness := thick]].
((self containsPoint: (aPosition := evt cursorPoint)) and: [dragged not])
ifFalse:
[flapShowing ifFalse: [self showFlap].
relativePosition := aPosition - evt hand targetOffset.
adjustedPosition := aPosition - (owner position + evt hand targetOffset).
(edgeToAdhereTo == #bottom)
ifTrue:
[newReferentThickness := inboard
ifTrue:
[owner height - adjustedPosition y]
ifFalse:
[owner height - adjustedPosition y - self height]].
(edgeToAdhereTo == #left)
ifTrue:
+ [newReferentThickness :=
- [newReferentThickness _
inboard
ifTrue:
[adjustedPosition x + self width]
ifFalse:
[adjustedPosition x]].
(edgeToAdhereTo == #right)
ifTrue:
+ [newReferentThickness :=
- [newReferentThickness _
inboard
ifTrue:
[owner width - adjustedPosition x]
ifFalse:
[owner width - adjustedPosition x - self width]].
(edgeToAdhereTo == #top)
ifTrue:
+ [newReferentThickness :=
- [newReferentThickness _
inboard
ifTrue:
[adjustedPosition y + self height]
ifFalse:
[adjustedPosition y]].
self isCurrentlySolid ifFalse:
[(#(left right) includes: edgeToAdhereTo)
ifFalse:
[self left: relativePosition x]
ifTrue:
[self top: relativePosition y]].
self applyThickness: newReferentThickness.
dragged := true.
self fitOnScreen.
self computeEdgeFraction]!
Item was changed:
----- Method: SpectrumAnalyzerMorph>>showSonogram (in category 'private') -----
showSonogram
"Display a sonogram showing the frequency spectrum versus time."
| zeros h w |
displayType := 'sonogram'.
self removeAllDisplays.
h := fft n // 2.
h := h min: 512 max: 64.
w := 400.
+ sonogramMorph :=
- sonogramMorph _
Sonogram new
extent: w at h
minVal: 0.0
maxVal: 1.0
scrollDelta: w.
zeros := Array new: sonogramMorph height withAll: 0.
sonogramMorph width timesRepeat: [sonogramMorph plotColumn: zeros].
self addMorphBack: sonogramMorph.
self extent: 10 at 10. "shrink to minimum size"
!
More information about the Squeak-dev
mailing list
|