Button.st
changeset 1093 cb7b2c99f5cc
parent 1092 ccd72fe62ef5
child 1094 472652d88011
equal deleted inserted replaced
1092:ccd72fe62ef5 1093:cb7b2c99f5cc
  1234     self computeLabelSize.
  1234     self computeLabelSize.
  1235     self beImageButton.
  1235     self beImageButton.
  1236 
  1236 
  1237     "Created: 22.9.1995 / 15:48:05 / claus"
  1237     "Created: 22.9.1995 / 15:48:05 / claus"
  1238     "Modified: 22.9.1995 / 17:07:46 / claus"
  1238     "Modified: 22.9.1995 / 17:07:46 / claus"
       
  1239 !
       
  1240 
       
  1241 defaultable
       
  1242     "return true, if the receiver is defaultable"
       
  1243 
       
  1244     ^ defaultable
  1239 !
  1245 !
  1240 
  1246 
  1241 defaultable:aBoolean
  1247 defaultable:aBoolean
  1242     "set/clear the defaultable attribute. If defaultable,
  1248     "set/clear the defaultable attribute. If defaultable,
  1243      the preferredExtent is computed to include any additional
  1249      the preferredExtent is computed to include any additional
  1754      shift it somwehat to the right (we have already allocated the
  1760      shift it somwehat to the right (we have already allocated the
  1755      real estate, since computeLabelSize returned some extra space
  1761      real estate, since computeLabelSize returned some extra space
  1756      before)."
  1762      before)."
  1757 
  1763 
  1758     super computeLabelOrigin.
  1764     super computeLabelOrigin.
  1759     (isReturnButton and:[shadowForm notNil]) ifTrue:[
  1765     shadowForm notNil ifTrue:[
  1760 	labelOriginX := labelOriginX + hSpace + hSpace.
  1766         isReturnButton ifTrue:[
       
  1767             labelOriginX := labelOriginX + hSpace + hSpace.
       
  1768         ].
       
  1769 
       
  1770         defaultable ifTrue:[
       
  1771             labelOriginX < margin ifTrue:[
       
  1772                 labelOriginX := margin
       
  1773             ]
       
  1774         ]
  1761     ]
  1775     ]
       
  1776 
       
  1777     "Modified: 3.3.1997 / 15:56:05 / cg"
  1762 !
  1778 !
  1763 
  1779 
  1764 computeLabelSize
  1780 computeLabelSize
  1765     "compute the extent needed to hold the label (plus the return form)"
  1781     "compute the extent needed to hold the label (plus the return form)"
  1766 
  1782 
  1770 	labelHeight := labelHeight max: (shadowForm height + vSpace)
  1786 	labelHeight := labelHeight max: (shadowForm height + vSpace)
  1771     ]
  1787     ]
  1772 ! !
  1788 ! !
  1773 
  1789 
  1774 !Button methodsFor:'queries'!
  1790 !Button methodsFor:'queries'!
  1775 
       
  1776 defaultable
       
  1777     "return true, if the receiver is defaultable"
       
  1778 
       
  1779     ^ defaultable
       
  1780 !
       
  1781 
  1791 
  1782 is3D
  1792 is3D
  1783     "return true, if the receiver is a 3D style view"
  1793     "return true, if the receiver is a 3D style view"
  1784 
  1794 
  1785     <resource: #style (#name)>
  1795     <resource: #style (#name)>
  2092 ! !
  2102 ! !
  2093 
  2103 
  2094 !Button class methodsFor:'documentation'!
  2104 !Button class methodsFor:'documentation'!
  2095 
  2105 
  2096 version
  2106 version
  2097     ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.79 1997-03-03 10:02:01 cg Exp $'
  2107     ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.80 1997-03-03 14:57:20 cg Exp $'
  2098 ! !
  2108 ! !