HorizontalScrollBar.st
changeset 762 832730063164
parent 713 0c38ad51016d
child 786 8b301af1cdcc
equal deleted inserted replaced
761:5bd603d649d6 762:832730063164
    71 ! !
    71 ! !
    72 
    72 
    73 !HorizontalScrollBar methodsFor:'event handling'!
    73 !HorizontalScrollBar methodsFor:'event handling'!
    74 
    74 
    75 sizeChanged:how
    75 sizeChanged:how
       
    76     <resource: #style (#name)>
       
    77 
    76     "handle changed size - reposition elements"
    78     "handle changed size - reposition elements"
    77 
    79 
    78     |leftWidth rightWidth thumbWidth leftAndRightWidth bwn sep2 
    80     |leftWidth rightWidth thumbWidth leftAndRightWidth bwn sep2 
    79      thumbHeight h style b1Hidden b2Hidden thumbHidden bX|
    81      thumbHeight h style b1Hidden b2Hidden thumbHidden bX|
    80 
    82 
   199         thumb extent:((thumbWidth + margin - (margin // 2)) @ thumbHeight).
   201         thumb extent:((thumbWidth + margin - (margin // 2)) @ thumbHeight).
   200         thumb origin:((leftWidth - borderWidth + elementSpacing) @ bwn)
   202         thumb origin:((leftWidth - borderWidth + elementSpacing) @ bwn)
   201     ].
   203     ].
   202 
   204 
   203     "Modified: 3.5.1996 / 23:47:30 / stefan"
   205     "Modified: 3.5.1996 / 23:47:30 / stefan"
       
   206     "Modified: 12.6.1996 / 14:57:33 / cg"
   204 ! !
   207 ! !
   205 
   208 
   206 !HorizontalScrollBar methodsFor:'initialization'!
   209 !HorizontalScrollBar methodsFor:'initialization'!
   207 
   210 
   208 createElements
   211 createElements
   251 ! !
   254 ! !
   252 
   255 
   253 !HorizontalScrollBar methodsFor:'queries'!
   256 !HorizontalScrollBar methodsFor:'queries'!
   254 
   257 
   255 preferredExtent
   258 preferredExtent
       
   259     <resource: #style (#name)>
       
   260 
   256     "compute my extent from sub-components"
   261     "compute my extent from sub-components"
   257 
   262 
   258     |w h leftForm rightForm wLeft hLeft wRight hRight style|
   263     |w h leftForm rightForm wLeft hLeft wRight hRight style|
   259 
   264 
   260     preferredExtent notNil ifTrue:[
   265     preferredExtent notNil ifTrue:[
   292             w := w + 4
   297             w := w + 4
   293         ].
   298         ].
   294     ].
   299     ].
   295     ^ w @ h.
   300     ^ w @ h.
   296 
   301 
   297     "Modified: 29.5.1996 / 12:12:26 / cg"
   302     "Modified: 12.6.1996 / 14:57:26 / cg"
   298 ! !
   303 ! !
   299 
   304 
   300 !HorizontalScrollBar class methodsFor:'documentation'!
   305 !HorizontalScrollBar class methodsFor:'documentation'!
   301 
   306 
   302 version
   307 version
   303     ^ '$Header: /cvs/stx/stx/libwidg/HorizontalScrollBar.st,v 1.19 1996-05-29 10:18:58 cg Exp $'
   308     ^ '$Header: /cvs/stx/stx/libwidg/HorizontalScrollBar.st,v 1.20 1996-06-12 12:57:41 cg Exp $'
   304 ! !
   309 ! !