HorizontalMiniScroller.st
author claus
Tue, 06 Jun 1995 06:16:07 +0200
changeset 130 338e856bddc9
parent 118 3ee5ea99d0e2
child 174 d80a6cc3f9b2
permissions -rw-r--r--
.

"
 COPYRIGHT (c) 1994 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.
"

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

HorizontalMiniScroller comment:'
COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.4 1995-06-06 04:13:41 claus Exp $
'!

!HorizontalMiniScroller class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 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.
"
!

version
"
$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.4 1995-06-06 04:13:41 claus Exp $
"
!

documentation
"
    like a scroller, but takingless screen space.
"
! !

!HorizontalMiniScroller methodsFor:'queries'!

preferredExtent
    "make my height very small"

    |w h mm|

    w := self class defaultExtent x.
    mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
    h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
    ^ w @ h.
! !

!HorizontalMiniScroller methodsFor:'initialization'!

initStyle
    |style lvl|

    super initStyle.
    style := styleSheet name.
    style == #iris ifTrue:[
	tallyLevel := 0.
	tallyMarks := 0.
	thumbEdgeStyle := nil.
	thumbLevel := 2.
    ].
    ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
	style == #st80 ifTrue:[
	    lvl := inset := 1.
	] ifFalse:[
	    lvl := -1.
	].
	self level:lvl.
	self borderWidth:0
    ].
    shadowForm := lightForm := nil.
    fixThumbHeight := false
! !