Cursor.st
changeset 160 f7d9126b3c0b
parent 157 891eff44c2e7
child 162 0f14db5e47c1
equal deleted inserted replaced
159:4c8ff071c8de 160:f7d9126b3c0b
    29 
    29 
    30 Cursor comment:'
    30 Cursor comment:'
    31 COPYRIGHT (c) 1992 by Claus Gittinger
    31 COPYRIGHT (c) 1992 by Claus Gittinger
    32 	     All Rights Reserved
    32 	     All Rights Reserved
    33 
    33 
    34 $Header: /cvs/stx/stx/libview/Cursor.st,v 1.20 1995-07-23 02:25:38 claus Exp $
    34 $Header: /cvs/stx/stx/libview/Cursor.st,v 1.21 1995-08-03 01:31:34 claus Exp $
    35 '!
    35 '!
    36 
    36 
    37 !Cursor class methodsFor:'documentation'!
    37 !Cursor class methodsFor:'documentation'!
    38 
    38 
    39 copyright
    39 copyright
    50 "
    50 "
    51 !
    51 !
    52 
    52 
    53 version
    53 version
    54 "
    54 "
    55 $Header: /cvs/stx/stx/libview/Cursor.st,v 1.20 1995-07-23 02:25:38 claus Exp $
    55 $Header: /cvs/stx/stx/libview/Cursor.st,v 1.21 1995-08-03 01:31:34 claus Exp $
    56 "
    56 "
    57 !
    57 !
    58 
    58 
    59 documentation
    59 documentation
    60 "
    60 "
   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