HorizontalSlider.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:53:39 +0200
changeset 6083 7a2c0a30e75c
parent 5955 01736fd997e6
permissions -rw-r--r--
#REFACTORING by exept class: NoteBookView changed: #buttonPress:x:y: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...

"{ Encoding: utf8 }"

"
 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.
"
"{ Package: 'stx:libwidg2' }"

"{ NameSpace: Smalltalk }"

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
    orientation := #horizontal. 
    super initialize.
    sliderHeight := (self horizontalPixelPerMillimeter:10) rounded.

    "Modified: / 7.3.1999 / 00:00:47 / cg"
! !

!HorizontalSlider methodsFor:'queries'!

computePreferredExtent
    "return the view's preferredExtent."

    |w h|

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

    preferredExtent := w @ h.
    ^ preferredExtent.

    "Created: / 09-11-2018 / 19:55:19 / Claus Gittinger"
! !

!HorizontalSlider class methodsFor:'documentation'!

version
    ^ '$Header$'
! !