Scroller.st
changeset 1493 3b76c81608e5
parent 1485 5716db1ccb4e
child 1507 c712eb1a247e
equal deleted inserted replaced
1492:348f9d99ff8a 1493:3b76c81608e5
  1526 
  1526 
  1527     self thumbOrigin:(thumbOrigin - thumbHeight).
  1527     self thumbOrigin:(thumbOrigin - thumbHeight).
  1528     self tellOthers
  1528     self tellOthers
  1529 !
  1529 !
  1530 
  1530 
       
  1531 scrollStep:delta
       
  1532     "step by some delta"
       
  1533 
       
  1534     |oldOrg newOrg|
       
  1535 
       
  1536     oldOrg := self thumbOrigin.
       
  1537     newOrg := ((oldOrg + delta) max:rangeStart) min:rangeEnd.
       
  1538     oldOrg ~= newOrg ifTrue:[
       
  1539         self thumbOrigin:newOrg.
       
  1540         self tellOthers.
       
  1541     ]
       
  1542 
       
  1543     "Created: / 21.4.1998 / 20:51:57 / cg"
       
  1544     "Modified: / 21.4.1998 / 20:52:22 / cg"
       
  1545 !
       
  1546 
  1531 scrollToBeginning
  1547 scrollToBeginning
  1532     "scroll to the beginning"
  1548     "scroll to the beginning"
  1533 
  1549 
  1534     self thumbOrigin:rangeStart.
  1550     self thumbOrigin:rangeStart.
  1535     self tellOthers
  1551     self tellOthers
  2115 ! !
  2131 ! !
  2116 
  2132 
  2117 !Scroller class methodsFor:'documentation'!
  2133 !Scroller class methodsFor:'documentation'!
  2118 
  2134 
  2119 version
  2135 version
  2120     ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.100 1998-04-14 17:39:09 cg Exp $'
  2136     ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.101 1998-04-21 18:53:22 cg Exp $'
  2121 ! !
  2137 ! !