Scroller.st
changeset 65 b33e4f3a264e
parent 63 f4eaf04d1eaf
child 70 14443a9ea4ec
equal deleted inserted replaced
64:c4e3323a5348 65:b33e4f3a264e
    41 
    41 
    42 Scroller comment:'
    42 Scroller comment:'
    43 COPYRIGHT (c) 1989 by Claus Gittinger
    43 COPYRIGHT (c) 1989 by Claus Gittinger
    44 	      All Rights Reserved
    44 	      All Rights Reserved
    45 
    45 
    46 $Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.10 1994-11-17 14:38:34 claus Exp $
    46 $Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.11 1994-11-21 16:46:30 claus Exp $
    47 '!
    47 '!
    48 
    48 
    49 !Scroller class methodsFor:'documentation'!
    49 !Scroller class methodsFor:'documentation'!
    50 
    50 
    51 copyright
    51 copyright
    62 "
    62 "
    63 !
    63 !
    64 
    64 
    65 version
    65 version
    66 "
    66 "
    67 $Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.10 1994-11-17 14:38:34 claus Exp $
    67 $Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.11 1994-11-21 16:46:30 claus Exp $
    68 "
    68 "
    69 !
    69 !
    70 
    70 
    71 documentation
    71 documentation
    72 "
    72 "
   612 
   612 
   613     (contentsSize = 0) ifTrue:[
   613     (contentsSize = 0) ifTrue:[
   614 	percentSize := 100.
   614 	percentSize := 100.
   615 	percentOrigin := 100
   615 	percentOrigin := 100
   616     ] ifFalse:[
   616     ] ifFalse:[
   617 	viewsSize := (moveDirection == #y) ifTrue:[aView innerHeight] ifFalse:[aView innerWidth].
   617 	(moveDirection == #y) ifTrue:[
   618 	contentsPosition := (moveDirection == #y) ifTrue:[aView yOriginOfContents] ifFalse:[aView xOriginOfContents].
   618 	    viewsSize := aView innerHeight.
   619 
   619 	    contentsPosition := aView yOriginOfContents.
       
   620 	] ifFalse:[
       
   621 	    viewsSize := aView innerWidth.
       
   622 	    contentsPosition := aView xOriginOfContents
       
   623 	].
   620 
   624 
   621 	percentSize := viewsSize * 100.0 / contentsSize.
   625 	percentSize := viewsSize * 100.0 / contentsSize.
   622 	percentOrigin := contentsPosition * 100.0 / contentsSize.
   626 	percentOrigin := contentsPosition * 100.0 / contentsSize.
   623 	percentOrigin + percentSize > 100.0 ifTrue:[
   627 	percentOrigin + percentSize > 100.0 ifTrue:[
   624 	    "actually showing stuff below contents of view"
   628 	    "actually showing stuff below contents of view"