ScrView.st
changeset 1695 c289e9656d9d
parent 1694 61bcd88d3721
child 1719 3d4adf98c079
equal deleted inserted replaced
1694:61bcd88d3721 1695:c289e9656d9d
  1495       Consider this as a kludge."
  1495       Consider this as a kludge."
  1496 
  1496 
  1497     lockUpdates := false.
  1497     lockUpdates := false.
  1498 
  1498 
  1499     vScrollBar notNil ifTrue:[
  1499     vScrollBar notNil ifTrue:[
  1500 	vScrollBar scrollAction:[:position |
  1500         vScrollBar scrollAction:[:position |
  1501 	    lockUpdates := true.
  1501             lockUpdates := true.
  1502 	    scrolledView scrollVerticalToPercent:position.
  1502             scrolledView scrollVerticalToPercent:position.
  1503 	    lockUpdates := false
  1503             lockUpdates := false
  1504 	].
  1504         ].
  1505 	vScrollBar scrollUpAction:[scrolledView scrollUp].
  1505         vScrollBar 
  1506 	vScrollBar scrollDownAction:[scrolledView scrollDown].
  1506             scrollUpAction:[|sensor|
       
  1507                             ((sensor := self sensor) notNil
       
  1508                             and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
       
  1509                                 scrolledView scrollToTop
       
  1510                             ] ifFalse:[
       
  1511                                 scrolledView scrollUp
       
  1512                             ]
       
  1513                            ].
       
  1514         vScrollBar 
       
  1515             scrollDownAction:[|sensor|
       
  1516                             ((sensor := self sensor) notNil
       
  1517                             and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
       
  1518                                 scrolledView scrollToBottom
       
  1519                             ] ifFalse:[
       
  1520                                 scrolledView scrollDown
       
  1521                             ]
       
  1522                            ].
  1507     ].
  1523     ].
  1508     hScrollBar notNil ifTrue:[
  1524     hScrollBar notNil ifTrue:[
  1509 	hScrollBar scrollAction:[:position |
  1525         hScrollBar scrollAction:[:position |
  1510 	    lockUpdates := true.
  1526             lockUpdates := true.
  1511 	    scrolledView scrollHorizontalToPercent:position.
  1527             scrolledView scrollHorizontalToPercent:position.
  1512 	    lockUpdates := false
  1528             lockUpdates := false
  1513 	].
  1529         ].
  1514 	hScrollBar scrollUpAction:[scrolledView scrollLeft].
  1530         hScrollBar 
  1515 	hScrollBar scrollDownAction:[scrolledView scrollRight].
  1531             scrollUpAction:[|sensor|
       
  1532                             ((sensor := self sensor) notNil
       
  1533                             and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
       
  1534                                 scrolledView scrollToLeft
       
  1535                             ] ifFalse:[
       
  1536                                 scrolledView scrollLeft
       
  1537                             ]
       
  1538                            ].
       
  1539         hScrollBar 
       
  1540             scrollDownAction:[|sensor|
       
  1541                             ((sensor := self sensor) notNil
       
  1542                             and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[
       
  1543                                 scrolledView scrollToRight
       
  1544                             ] ifFalse:[
       
  1545                                 scrolledView scrollRight
       
  1546                             ]
       
  1547                              ].
  1516     ].
  1548     ].
  1517 
  1549 
  1518     scrolledView addDependent:self.
  1550     scrolledView addDependent:self.
  1519 
  1551 
  1520     "
  1552     "
  2000 ! !
  2032 ! !
  2001 
  2033 
  2002 !ScrollableView class methodsFor:'documentation'!
  2034 !ScrollableView class methodsFor:'documentation'!
  2003 
  2035 
  2004 version
  2036 version
  2005     ^ '$Header: /cvs/stx/stx/libwidg/Attic/ScrView.st,v 1.88 1998-09-28 09:27:50 cg Exp $'
  2037     ^ '$Header: /cvs/stx/stx/libwidg/Attic/ScrView.st,v 1.89 1998-09-28 11:50:27 cg Exp $'
  2006 ! !
  2038 ! !