SimpleView.st
changeset 1052 c7e31a453192
parent 1048 f6d383b7f113
child 1063 ba1bf8091bc1
equal deleted inserted replaced
1051:5605bf1b10b9 1052:c7e31a453192
  5723      Subclasses may want to redefine this."
  5723      Subclasses may want to redefine this."
  5724 
  5724 
  5725     ^ (device horizontalPixelPerMillimeter * 20) asInteger
  5725     ^ (device horizontalPixelPerMillimeter * 20) asInteger
  5726 !
  5726 !
  5727 
  5727 
       
  5728 pageDown
       
  5729     self scrollDown:(self innerHeight)
       
  5730 
       
  5731     "Created: 13.9.1996 / 14:06:54 / cg"
       
  5732 !
       
  5733 
       
  5734 pageUp
       
  5735     self scrollUp:(self innerHeight)
       
  5736 
       
  5737     "Created: 13.9.1996 / 14:07:01 / cg"
       
  5738 !
       
  5739 
  5728 scrollDown
  5740 scrollDown
  5729     "scroll down by some amount; this is called when the scrollbars
  5741     "scroll down by some amount; this is called when the scrollbars
  5730      scroll-step down button is pressed."
  5742      scroll-step down button is pressed."
  5731 
  5743 
  5732     self scrollDown:(self verticalScrollStep)
  5744     self scrollDown:(self verticalScrollStep)
  5799 
  5811 
  5800     viewOrigin := self viewOrigin.
  5812     viewOrigin := self viewOrigin.
  5801     ^ self scrollTo:((viewOrigin x + nPixels) @ viewOrigin y)
  5813     ^ self scrollTo:((viewOrigin x + nPixels) @ viewOrigin y)
  5802 
  5814 
  5803     "Modified: 20.8.1996 / 17:35:37 / stefan"
  5815     "Modified: 20.8.1996 / 17:35:37 / stefan"
       
  5816 !
       
  5817 
       
  5818 scrollToBottom
       
  5819     self scrollTo:0 @ (self heightOfContents - self innerHeight)
       
  5820 
       
  5821     "Created: 13.9.1996 / 14:08:03 / cg"
       
  5822     "Modified: 13.9.1996 / 14:09:32 / cg"
  5804 !
  5823 !
  5805 
  5824 
  5806 scrollToPercent:originAsPercent
  5825 scrollToPercent:originAsPercent
  5807     "scroll to a position given in percent of total (x and y as a Point)"
  5826     "scroll to a position given in percent of total (x and y as a Point)"
  5808 
  5827 
  5905      point."
  5924      point."
  5906 
  5925 
  5907      ^ self scrollTo:newOrigin redraw:true
  5926      ^ self scrollTo:newOrigin redraw:true
  5908 
  5927 
  5909     "Modified: 15.7.1996 / 11:35:08 / stefan"
  5928     "Modified: 15.7.1996 / 11:35:08 / stefan"
       
  5929     "Modified: 13.9.1996 / 14:09:19 / cg"
  5910 !
  5930 !
  5911 
  5931 
  5912 scrollTo:newOrigin redraw:doRedraw
  5932 scrollTo:newOrigin redraw:doRedraw
  5913     "change origin to have newOrigin be visible at the top-left.
  5933     "change origin to have newOrigin be visible at the top-left.
  5914      The argument defines the integer device coordinates of the new top-left 
  5934      The argument defines the integer device coordinates of the new top-left 
  6438 ! !
  6458 ! !
  6439 
  6459 
  6440 !SimpleView  class methodsFor:'documentation'!
  6460 !SimpleView  class methodsFor:'documentation'!
  6441 
  6461 
  6442 version
  6462 version
  6443     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.141 1996-09-11 14:52:49 dq Exp $'
  6463     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.142 1996-09-13 16:54:23 cg Exp $'
  6444 ! !
  6464 ! !
  6445 SimpleView initialize!
  6465 SimpleView initialize!