923 ! ! |
923 ! ! |
924 |
924 |
925 !Cursor methodsFor:'ST-80 displaying'! |
925 !Cursor methodsFor:'ST-80 displaying'! |
926 |
926 |
927 showIn:aView |
927 showIn:aView |
|
928 "ST-80 mimicri: install the receiver as aViews cursor" |
|
929 |
928 aView cursor:self |
930 aView cursor:self |
929 ! |
931 ! |
930 |
932 |
931 showIn:aView while:aBlock |
933 showIn:aView while:aBlock |
|
934 "ST-80 mimicri: change aViews cursors to the receiver, while evaluationg aBlock. |
|
935 Return the value as returned by aBlock." |
|
936 |
932 |savedCursor| |
937 |savedCursor| |
933 |
938 |
934 savedCursor := aView cursor. |
939 savedCursor := aView cursor. |
935 aView cursor:self. |
940 aView cursor:self. |
936 [ |
941 ^ aBlock valueNowOrOnUnwindDo:[aView cursor:savedCursor] |
937 aBlock value. |
|
938 ] valueNowOrOnUnwindDo:[ |
|
939 aView cursor:savedCursor |
|
940 ] |
|
941 ! |
942 ! |
942 |
943 |
943 showWhile:aBlock |
944 showWhile:aBlock |
944 "change all views cursors to the receiver. |
945 "ST-80 mimicri: change all views cursors to the receiver. |
945 In X this seems to be very slow" |
946 Return the value as returned by aBlock." |
946 |
947 |
947 |v| |
948 ^ WindowGroup activeGroup withCursor:self do:aBlock |
948 |
949 |
949 Display setCursors:self. |
950 "/ |v| |
950 v := aBlock valueNowOrOnUnwindDo:[ |
951 "/ |
951 Display restoreCursors. |
952 "/ Display setCursors:self. |
952 ]. |
953 "/ v := aBlock valueNowOrOnUnwindDo:[ |
953 ^ v |
954 "/ Display restoreCursors. |
|
955 "/ ]. |
|
956 "/ ^ v |
954 ! |
957 ! |
955 |
958 |
956 show |
959 show |
957 "change cursors in active groups views to the receiver. |
960 "ST-80 mimicri: change cursors in active groups views to the receiver." |
958 In X this seems to be very slow" |
|
959 |
961 |
960 WindowGroup activeGroup showCursor:self |
962 WindowGroup activeGroup showCursor:self |
961 ! |
963 ! |
962 |
964 |
963 displayOn:aGC at:origin clippingBox:aRectangle rule:aRule mask:aMask |
965 displayOn:aGC at:origin clippingBox:aRectangle rule:aRule mask:aMask |