ListSelectionBox.st
changeset 6506 0f7404be1444
parent 5936 fb13d3e9492e
child 6636 38d038e2f7c0
equal deleted inserted replaced
6505:eb911b9d5328 6506:0f7404be1444
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1990 by Claus Gittinger
     4  COPYRIGHT (c) 1990 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   449     "Created: / 03-08-2011 / 12:27:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   451     "Created: / 03-08-2011 / 12:27:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   450 ! !
   452 ! !
   451 
   453 
   452 !ListSelectionBox methodsFor:'queries'!
   454 !ListSelectionBox methodsFor:'queries'!
   453 
   455 
   454 preferredExtent
   456 computePreferredExtent
   455     "return my preferred extent 
   457     "return my preferred extent 
   456      - that's the minimum size I like to have, to make everything visible"
   458      - that's the minimum size I like to have, to make everything visible"
   457 
   459 
   458     |wWanted hWanted eH mm bw|
   460     |wWanted hWanted eH mm bw|
   459 
       
   460     "/ If I have an explicit preferredExtent..
       
   461     explicitExtent notNil ifTrue:[
       
   462         ^ explicitExtent
       
   463     ].
       
   464 
       
   465     "/ If I have a cached preferredExtent value..
       
   466     preferredExtent notNil ifTrue:[
       
   467         ^ preferredExtent
       
   468     ].
       
   469 
   461 
   470     mm := ViewSpacing.
   462     mm := ViewSpacing.
   471 
   463 
   472     wWanted := mm + labelField width + mm.
   464     wWanted := mm + labelField width + mm.
   473     (wWanted > width) ifFalse:[
   465     (wWanted > width) ifFalse:[
   492     (hWanted < height) ifTrue:[
   484     (hWanted < height) ifTrue:[
   493         hWanted := height
   485         hWanted := height
   494     ].
   486     ].
   495     ^ (wWanted @ hWanted)
   487     ^ (wWanted @ hWanted)
   496 
   488 
   497     "Modified: 19.7.1996 / 20:44:52 / cg"
   489     "Created: / 09-11-2018 / 19:56:31 / Claus Gittinger"
   498 ! !
   490 ! !
   499 
   491 
   500 !ListSelectionBox methodsFor:'user actions'!
   492 !ListSelectionBox methodsFor:'user actions'!
   501 
   493 
   502 actionArgument
   494 actionArgument