HorizontalSlider.st
author Claus Gittinger <cg@exept.de>
Mon, 15 Jul 1996 12:09:08 +0200
changeset 212 b63b8bf60d88
parent 192 e060e80f8e24
child 222 11fce0339069
permissions -rw-r--r--
remember and do not recompute the preferredExtent;

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

Slider subclass:#HorizontalSlider
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Views-Interactors'
!

!HorizontalSlider  class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1992 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
"
    this class implements horizontal sliders.

    [author:]
        Claus Gittinger
"
! !

!HorizontalSlider methodsFor:'initialization'!

initialize
    super initialize.
    sliderHeight := (self horizontalPixelPerMillimeter:10) rounded.
    orientation := #horizontal 
! !

!HorizontalSlider methodsFor:'queries'!

preferredExtent
    "return the views preferredExtent."

    |w h|

    preferredExtent notNil ifTrue:[
        ^ preferredExtent
    ].

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

    preferredExtent := w @ h.
    ^ preferredExtent.

    "Modified: 15.7.1996 / 09:56:39 / cg"
! !

!HorizontalSlider  class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libwidg2/HorizontalSlider.st,v 1.12 1996-07-15 10:09:08 cg Exp $'
! !