[Morphic] Missing methods in 3.9b 7032
Lic. Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Tue May 23 11:08:10 UTC 2006
Guys
I found the two attached methods are missing in 3.9b 7032.
I refile from 3.8 and have my project happy.
But I wish know if this two was removed by Morphic refactoring (Juan) or by
some accident.
And if two methods don't should be in new image, what replace it for correct
my old projects
Very thanks
-------------- next part --------------
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 23 May 2006 at 7:52:20 am'!
!SystemWindow methodsFor: 'resize/collapse' stamp: 'aoy 2/15/2003 21:06'!
spawnPaneFrameHandle: event
| resizer localPt side growingPane newBounds adjoiningPanes limit cursor |
(self world firstSubmorph isKindOf: NewHandleMorph)
ifTrue: [^self "Prevent multiple handles"].
((self innerBounds withHeight: self labelHeight + 4)
containsPoint: event cursorPoint)
ifTrue: [^self "in label or top of top pane"].
growingPane := self paneWithLongestSide: [:s | side := s]
near: event cursorPoint.
growingPane ifNil: [^self].
"don't resize pane side coincident with window side - RAA 5 jul 2000"
(growingPane perform: side) = (self innerBounds perform: side)
ifTrue: [^self].
(side == #top and: [growingPane top = self panelRect top]) ifTrue: [^self].
adjoiningPanes := paneMorphs
select: [:pane | pane bounds bordersOn: growingPane bounds along: side].
limit := adjoiningPanes isEmpty
ifFalse:
[(adjoiningPanes collect: [:pane | pane bounds perform: side])
perform: ((#(#top #left) includes: side) ifTrue: [#max] ifFalse: [#min])]
ifTrue: [self bounds perform: side].
cursor := Cursor resizeForEdge: side.
resizer := (NewHandleMorph new)
sensorMode: self fastFramingOn;
followHand: event hand
forEachPointDo:
[:p |
localPt := self pointFromWorld: p.
newBounds := growingPane bounds
withSideOrCorner: side
setToPoint: localPt
minExtent: 40 @ 20
limit: limit.
self fastFramingOn
ifTrue:
["For fast display, only higlight the rectangle during loop"
Cursor currentCursor == cursor
ifFalse:
[(event hand)
visible: false;
refreshWorld;
visible: true.
cursor show].
newBounds := growingPane bounds newRectButtonPressedDo:
[:f |
growingPane bounds
withSideOrCorner: side
setToPoint: (self pointFromWorld: Sensor cursorPoint)
minExtent: 40 @ 20
limit: limit].].
self
reframePanesAdjoining: growingPane
along: side
to: newBounds.
]
lastPointDo: [:p | ]
withCursor: cursor.
event hand world addMorphInLayer: resizer.
resizer startStepping! !
-------------- next part --------------
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 23 May 2006 at 7:47:20 am'!
!SystemWindow methodsFor: 'resize/collapse' stamp: 'ar 8/18/2001 00:57'!
spawnReframeHandle: event
"The mouse has crossed a pane border. Spawn a reframe handle."
| resizer localPt pt ptName newBounds cursor |
allowReframeHandles ifFalse: [^ self].
owner ifNil: [^ self "Spurious mouseLeave due to delete"].
(self isActive not or: [self isCollapsed]) ifTrue: [^ self].
((self world ifNil: [^ self]) firstSubmorph isKindOf: NewHandleMorph) ifTrue:
[^ self "Prevent multiple handles"].
pt _ event cursorPoint.
"prevent spurios mouse leave when dropping morphs"
owner morphsInFrontOf: self overlapping: (pt-2 extent: 4 at 4)
do:[:m| m isHandMorph ifFalse:[(m fullContainsPoint: pt) ifTrue:[^self]]].
self bounds forPoint: pt closestSideDistLen:
[:side :dist :len | "Check for window side adjust"
dist <= 2 ifTrue: [ptName _ side]].
ptName ifNil:
["Check for pane border adjust"
^ self spawnPaneFrameHandle: event].
#(topLeft bottomRight bottomLeft topRight) do:
[:corner | "Check for window corner adjust"
(pt dist: (self bounds perform: corner)) < 20 ifTrue: [ptName _ corner]].
cursor _ Cursor resizeForEdge: ptName.
resizer _ NewHandleMorph new
sensorMode: self fastFramingOn;
followHand: event hand
forEachPointDo:
[:p | localPt _ self pointFromWorld: p.
newBounds _ self bounds
withSideOrCorner: ptName
setToPoint: localPt
minExtent: self minimumExtent.
self fastFramingOn
ifTrue:
[Cursor currentCursor == cursor ifFalse:[
event hand visible: false; refreshWorld; visible: true.
cursor show].
self doFastWindowReframe: ptName]
ifFalse:
[self bounds: newBounds.
(Preferences roundedWindowCorners
and: [#(bottom right bottomRight) includes: ptName])
ifTrue:
["Complete kluge: causes rounded corners to get painted correctly,
in spite of not working with top-down displayWorld."
ptName = #bottom ifFalse:
[self invalidRect: (self bounds topRight - (6 at 0) extent: 7 at 7)].
ptName = #right ifFalse:
[self invalidRect: (self bounds bottomLeft - (0 at 6) extent: 7 at 7)].
self invalidRect: (self bounds bottomRight - (6 at 6) extent: 7 at 7)]]]
lastPointDo:
[:p | ]
withCursor: cursor.
event hand world addMorphInLayer: resizer.
resizer startStepping! !
More information about the Morphic
mailing list