HorizontalMiniScroller.st
changeset 539 c7c5585e77f6
parent 205 6814c0bf8df8
child 556 4c3edf42c03e
equal deleted inserted replaced
538:b747ea31b972 539:c7c5585e77f6
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 HorizontalScroller subclass:#HorizontalMiniScroller
    13 MiniScroller subclass:#HorizontalMiniScroller
    14 	 instanceVariableNames:''
    14 	instanceVariableNames:''
    15 	 classVariableNames:''
    15 	classVariableNames:''
    16 	 poolDictionaries:''
    16 	poolDictionaries:''
    17 	 category:'Views-Interactors'
    17 	category:'Views-Interactors'
    18 !
    18 !
    19 
    19 
    20 !HorizontalMiniScroller class methodsFor:'documentation'!
    20 !HorizontalMiniScroller class methodsFor:'documentation'!
    21 
    21 
    22 copyright
    22 copyright
    37 "
    37 "
    38     like a scroller, but takingless screen space.
    38     like a scroller, but takingless screen space.
    39 "
    39 "
    40 ! !
    40 ! !
    41 
    41 
       
    42 !HorizontalMiniScroller methodsFor:'accessing-behavior'!
       
    43 
       
    44 scrollLeftAction:aBlock
       
    45     "ignored -
       
    46      but implemented, so that scroller can be used in place of a scrollbar"
       
    47 
       
    48     "Created: 17.4.1996 / 14:04:29 / cg"
       
    49 !
       
    50 
       
    51 scrollRightAction:aBlock
       
    52     "ignored -
       
    53      but implemented, so that scroller can be used in place of a scrollbar"
       
    54 
       
    55     "Created: 17.4.1996 / 14:04:30 / cg"
       
    56 ! !
       
    57 
    42 !HorizontalMiniScroller methodsFor:'initialization'!
    58 !HorizontalMiniScroller methodsFor:'initialization'!
    43 
    59 
    44 initStyle
    60 initialize
    45     |style lvl|
    61     super initialize.
       
    62     orientation := #horizontal
    46 
    63 
    47     super initStyle.
    64     "Created: 17.4.1996 / 14:01:26 / cg"
    48     style := styleSheet name.
       
    49     style == #iris ifTrue:[
       
    50 	tallyLevel := 0.
       
    51 	tallyMarks := 0.
       
    52 	thumbEdgeStyle := nil.
       
    53 	thumbLevel := 2.
       
    54     ].
       
    55     ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
       
    56 	style == #st80 ifTrue:[
       
    57 	    lvl := inset := 1.
       
    58 	] ifFalse:[
       
    59 	    lvl := -1.
       
    60 	].
       
    61 	self level:lvl.
       
    62 	self borderWidth:0
       
    63     ].
       
    64     shadowForm := lightForm := nil.
       
    65     fixThumbHeight := false
       
    66 ! !
       
    67 
       
    68 !HorizontalMiniScroller methodsFor:'queries'!
       
    69 
       
    70 preferredExtent
       
    71     "make my height very small"
       
    72 
       
    73     |w h mm|
       
    74 
       
    75     w := self class defaultExtent x.
       
    76     mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
       
    77     h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
       
    78     ^ w @ h.
       
    79 ! !
    65 ! !
    80 
    66 
    81 !HorizontalMiniScroller class methodsFor:'documentation'!
    67 !HorizontalMiniScroller class methodsFor:'documentation'!
    82 
    68 
    83 version
    69 version
    84     ^ '$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.6 1995-11-23 18:18:53 cg Exp $'
    70     ^ '$Header: /cvs/stx/stx/libwidg/HorizontalMiniScroller.st,v 1.7 1996-04-17 12:06:50 cg Exp $'
    85 ! !
    71 ! !