937 ! |
937 ! |
938 |
938 |
939 showUnselected:aComponent addAffectedViewsTo:aSet |
939 showUnselected:aComponent addAffectedViewsTo:aSet |
940 "show object unselected. If the set, an IdentitySet, is not nil, the |
940 "show object unselected. If the set, an IdentitySet, is not nil, the |
941 affected subviews are added into the set, otherwise an expose event |
941 affected subviews are added into the set, otherwise an expose event |
942 to each affected cpomponent is raised. |
942 to each affected component is raised. |
943 " |
943 " |
944 |wasClipped r| |
944 |wasClipped r v| |
945 |
945 |
946 selectionHiddenLevel ~~ 0 ifTrue:[^ self]. |
946 selectionHiddenLevel ~~ 0 ifTrue:[^ self]. |
947 |
947 |
948 (wasClipped := clipChildren) ifTrue:[ |
948 "/ new: simply create a little view ontop, |
949 self clippedByChildren:(clipChildren := false). |
949 "/ and move it over the handles. This will generate |
950 ]. |
950 "/ the required expose events automatically. |
951 |
951 |
952 self handlesOf:aComponent do:[:rec :wht| self clearRectangle:rec ]. |
952 v := SimpleView in:self. |
953 |
953 self handlesOf:aComponent do:[:rec :wht | |
954 wasClipped ifTrue:[ |
954 r isNil |
955 self clippedByChildren:(clipChildren := true). |
955 ifTrue:[r := rec] |
956 ]. |
956 ifFalse:[r := r merge:rec]. |
957 |
957 ]. |
958 "/ must redraw all components which are affected b the handles |
958 |
959 r := (aComponent originRelativeTo:self) - (3@3) extent:(aComponent extent + (6@6)). |
959 "/ if the area is small, make one big rectangle-expose |
960 |
960 r area < 10000 ifTrue:[ |
961 subViews do:[:anotherComponent | |
961 v origin:r origin extent:r extent. |
962 |absOrg absFrame| |
962 v map. |
963 |
963 v unmap. |
964 anotherComponent ~~ inputView ifTrue:[ |
964 ] ifFalse:[ |
965 absOrg := anotherComponent originRelativeTo:self. |
965 self handlesOf:aComponent do:[:rec :wht | |
966 absFrame := absOrg extent:(anotherComponent extent). |
966 v origin:rec origin extent:rec extent. |
967 (absFrame intersects:r) ifTrue:[ |
967 v map. |
968 anotherComponent withAllSubViewsDo:[:v | |
968 v unmap. |
969 v shown ifTrue:[ |
969 ]. |
970 aSet notNil ifTrue:[ |
970 ]. |
971 aSet add:v |
971 v destroy. |
972 ] ifFalse:[ |
972 ^ self. |
973 self handleAffectedViews:v |
973 |
974 ] |
974 "/ OLD code: |
975 ] |
975 "/ (wasClipped := clipChildren) ifTrue:[ |
976 ] |
976 "/ self clippedByChildren:(clipChildren := false). |
977 ] |
977 "/ ]. |
978 ] |
978 "/ |
979 ]. |
979 "/ self handlesOf:aComponent do:[:rec :wht| self clearRectangle:rec ]. |
980 |
980 "/ |
|
981 "/ wasClipped ifTrue:[ |
|
982 "/ self clippedByChildren:(clipChildren := true). |
|
983 "/ ]. |
|
984 "/ |
|
985 "/ "/ must redraw all components which are affected b the handles |
|
986 "/ r := (aComponent originRelativeTo:self) - (3@3) extent:(aComponent extent + (6@6)). |
|
987 "/ |
|
988 "/ subViews do:[:anotherComponent | |
|
989 "/ |absOrg absFrame| |
|
990 "/ |
|
991 "/ anotherComponent ~~ inputView ifTrue:[ |
|
992 "/ absOrg := anotherComponent originRelativeTo:self. |
|
993 "/ absFrame := absOrg extent:(anotherComponent extent). |
|
994 "/ (absFrame intersects:r) ifTrue:[ |
|
995 "/ anotherComponent withAllSubViewsDo:[:v | |
|
996 "/ v shown ifTrue:[ |
|
997 "/ aSet notNil ifTrue:[ |
|
998 "/ aSet add:v |
|
999 "/ ] ifFalse:[ |
|
1000 "/ self handleAffectedViews:v |
|
1001 "/ ] |
|
1002 "/ ] |
|
1003 "/ ] |
|
1004 "/ ] |
|
1005 "/ ] |
|
1006 "/ ]. |
|
1007 |
|
1008 "Modified: / 24.8.1998 / 12:19:38 / cg" |
981 ! |
1009 ! |
982 |
1010 |
983 whichHandleOf:aComponent isHitBy:aPoint |
1011 whichHandleOf:aComponent isHitBy:aPoint |
984 "returns kind of handle or nil |
1012 "returns kind of handle or nil |
985 " |
1013 " |