# HG changeset patch # User Claus Gittinger # Date 903956714 -7200 # Node ID c3f483120cd7f3c8eec456f57cf000e8e2d38f71 # Parent bbea01c1de9801a771dd9e1ef2dd7671bc07b503 redraw handle areas by mapping a little view over the handles and let the expose event handle the real redraw. (this works on all systems - especially on win95) diff -r bbea01c1de98 -r c3f483120cd7 UIObjectView.st --- a/UIObjectView.st Mon Aug 24 12:57:57 1998 +0200 +++ b/UIObjectView.st Mon Aug 24 13:05:14 1998 +0200 @@ -939,45 +939,73 @@ showUnselected:aComponent addAffectedViewsTo:aSet "show object unselected. If the set, an IdentitySet, is not nil, the affected subviews are added into the set, otherwise an expose event - to each affected cpomponent is raised. + to each affected component is raised. " - |wasClipped r| + |wasClipped r v| selectionHiddenLevel ~~ 0 ifTrue:[^ self]. - (wasClipped := clipChildren) ifTrue:[ - self clippedByChildren:(clipChildren := false). + "/ new: simply create a little view ontop, + "/ and move it over the handles. This will generate + "/ the required expose events automatically. + + v := SimpleView in:self. + self handlesOf:aComponent do:[:rec :wht | + r isNil + ifTrue:[r := rec] + ifFalse:[r := r merge:rec]. ]. - self handlesOf:aComponent do:[:rec :wht| self clearRectangle:rec ]. - - wasClipped ifTrue:[ - self clippedByChildren:(clipChildren := true). + "/ if the area is small, make one big rectangle-expose + r area < 10000 ifTrue:[ + v origin:r origin extent:r extent. + v map. + v unmap. + ] ifFalse:[ + self handlesOf:aComponent do:[:rec :wht | + v origin:rec origin extent:rec extent. + v map. + v unmap. + ]. ]. - - "/ must redraw all components which are affected b the handles - r := (aComponent originRelativeTo:self) - (3@3) extent:(aComponent extent + (6@6)). - - subViews do:[:anotherComponent | - |absOrg absFrame| - - anotherComponent ~~ inputView ifTrue:[ - absOrg := anotherComponent originRelativeTo:self. - absFrame := absOrg extent:(anotherComponent extent). - (absFrame intersects:r) ifTrue:[ - anotherComponent withAllSubViewsDo:[:v | - v shown ifTrue:[ - aSet notNil ifTrue:[ - aSet add:v - ] ifFalse:[ - self handleAffectedViews:v - ] - ] - ] - ] - ] - ]. - + v destroy. + ^ self. + +"/ OLD code: +"/ (wasClipped := clipChildren) ifTrue:[ +"/ self clippedByChildren:(clipChildren := false). +"/ ]. +"/ +"/ self handlesOf:aComponent do:[:rec :wht| self clearRectangle:rec ]. +"/ +"/ wasClipped ifTrue:[ +"/ self clippedByChildren:(clipChildren := true). +"/ ]. +"/ +"/ "/ must redraw all components which are affected b the handles +"/ r := (aComponent originRelativeTo:self) - (3@3) extent:(aComponent extent + (6@6)). +"/ +"/ subViews do:[:anotherComponent | +"/ |absOrg absFrame| +"/ +"/ anotherComponent ~~ inputView ifTrue:[ +"/ absOrg := anotherComponent originRelativeTo:self. +"/ absFrame := absOrg extent:(anotherComponent extent). +"/ (absFrame intersects:r) ifTrue:[ +"/ anotherComponent withAllSubViewsDo:[:v | +"/ v shown ifTrue:[ +"/ aSet notNil ifTrue:[ +"/ aSet add:v +"/ ] ifFalse:[ +"/ self handleAffectedViews:v +"/ ] +"/ ] +"/ ] +"/ ] +"/ ] +"/ ]. + + "Modified: / 24.8.1998 / 12:19:38 / cg" ! whichHandleOf:aComponent isHitBy:aPoint