HorizontalScroller.st
author Claus Gittinger <cg@exept.de>
Sat, 11 Nov 1995 17:23:54 +0100
changeset 174 d80a6cc3f9b2
parent 150 9411bf3927d9
child 205 6814c0bf8df8
permissions -rw-r--r--
uff - version methods changed to return stings

"
 COPYRIGHT (c) 1989 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

'From Smalltalk/X, Version:2.10.5 on 30-apr-1995 at 1:46:18 am'!

Scroller subclass:#HorizontalScroller
	 instanceVariableNames:''
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Views-Interactors'
!

!HorizontalScroller class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1989 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    Actually simply a scroller which preinitializes itself to have
    a horizontal orientation.
"
!

version
    ^ '$Header: /cvs/stx/stx/libwidg/HorizontalScroller.st,v 1.11 1995-11-11 16:20:41 cg Exp $'
! !

!HorizontalScroller methodsFor:'initialization'!

initialize
    super initialize.
    orientation := #horizontal 
! !

!HorizontalScroller methodsFor:'accessing-behavior'!

scrollRightAction:aBlock
    "ignored -
     but implemented, so that scroller can be used in place of a scrollbar"
!

scrollLeftAction:aBlock
    "ignored -
     but implemented, so that scroller can be used in place of a scrollbar"
! !

!HorizontalScroller methodsFor:'queries'!

preferredExtent
    |w h|

    w := self class defaultExtent x.
    h := (device verticalPixelPerMillimeter asFloat * 6) rounded.
    ^ w @ h.
! !