Button.st
changeset 4000 aa7dd2f07400
parent 3926 b7cacdc31dc2
child 4004 fca1022e3569
equal deleted inserted replaced
3999:f605cc13731e 4000:aa7dd2f07400
  1945 "/    ]
  1945 "/    ]
  1946 
  1946 
  1947     "Modified: / 9.9.1998 / 20:22:01 / cg"
  1947     "Modified: / 9.9.1998 / 20:22:01 / cg"
  1948 !
  1948 !
  1949 
  1949 
  1950 computeLabelSize
       
  1951     "compute the extent needed to hold the label (plus the return form)"
       
  1952 
       
  1953     super computeLabelSize.
       
  1954     ((isReturnButton or:[defaultable]) and:[shadowForm notNil]) ifTrue:[
       
  1955         labelWidth := labelWidth + (hSpace * 2) + shadowForm width.
       
  1956         labelHeight := labelHeight max: (shadowForm height "+ vSpace")
       
  1957     ]
       
  1958 
       
  1959     "Modified: / 3.11.1997 / 09:15:52 / cg"
       
  1960 !
       
  1961 
       
  1962 getLabelFromLabelChannel
  1950 getLabelFromLabelChannel
  1963     passiveLogo := labelChannel value.
  1951     passiveLogo := labelChannel value.
  1964     super getLabelFromLabelChannel.
  1952     super getLabelFromLabelChannel.
       
  1953 !
       
  1954 
       
  1955 rawLabelSizeOf:aLogo
       
  1956     "compute the extent needed to hold the label (plus the return form)"
       
  1957 
       
  1958     |ext|
       
  1959 
       
  1960     ext := super rawLabelSizeOf:aLogo.
       
  1961 
       
  1962     (activeLogo notNil and:[activeLogo ~~ logo]) ifTrue:[
       
  1963         ext := ext max:(super rawLabelSizeOf:activeLogo).
       
  1964     ].
       
  1965     (passiveLogo notNil and:[passiveLogo ~~ logo]) ifTrue:[
       
  1966         ext := ext max:(super rawLabelSizeOf:passiveLogo).
       
  1967     ].
       
  1968 
       
  1969     ((isReturnButton or:[defaultable]) and:[shadowForm notNil]) ifTrue:[
       
  1970         ^ (ext x + (hSpace * 2) + shadowForm width)
       
  1971           @
       
  1972           (ext y max: (shadowForm height "+ vSpace"))
       
  1973     ].
       
  1974     ^ ext
       
  1975 
       
  1976     "Modified: / 3.11.1997 / 09:15:52 / cg"
  1965 !
  1977 !
  1966 
  1978 
  1967 shiftLabelWhenPressed
  1979 shiftLabelWhenPressed
  1968     ^ self class == Button
  1980     ^ self class == Button
  1969 ! !
  1981 ! !
  2354 ! !
  2366 ! !
  2355 
  2367 
  2356 !Button class methodsFor:'documentation'!
  2368 !Button class methodsFor:'documentation'!
  2357 
  2369 
  2358 version
  2370 version
  2359     ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.144 2009-09-18 12:43:37 cg Exp $'
  2371     ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.145 2009-10-21 14:24:32 cg Exp $'
       
  2372 !
       
  2373 
       
  2374 version_CVS
       
  2375     ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.145 2009-10-21 14:24:32 cg Exp $'
  2360 ! !
  2376 ! !