RButton.st
author claus
Wed, 24 Aug 1994 01:38:59 +0200
changeset 51 e895ac4cc7c8
parent 38 4b9b70b2cc87
child 59 450ce95a72a4
permissions -rw-r--r--
support non-string entries

"
 COPYRIGHT (c) 1991 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

Toggle subclass:#RadioButton
       instanceVariableNames:''
       classVariableNames:''
       poolDictionaries:''
       category:'Views-Interactors'
!

RadioButton comment:'
COPYRIGHT (c) 1991 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libwidg/Attic/RButton.st,v 1.4 1994-08-07 13:23:14 claus Exp $
'!

!RadioButton class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1991 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

version
"
$Header: /cvs/stx/stx/libwidg/Attic/RButton.st,v 1.4 1994-08-07 13:23:14 claus Exp $
"
!

documentation
"
    like a Toggle, but do not turn off when pressed again, instead only
    turn off when another RadioButton is pressed (see RadioButtonGroup).

    written fall 91 by claus
"
! !

!RadioButton methodsFor:'destroying'!

destroy
    self release.
    super destroy
! !

!RadioButton methodsFor:'changing state'!

toggle
    "in addition to toggling, notify RadioButtonGroup"

    enabled ifTrue:[
	super toggle.
	pressed ifTrue:[
	    self changed
	]
    ]
! !

!RadioButton methodsFor:'events'!

buttonPress:button x:x y:y
    "radiobuttons change only off-to-on; turning off is done by other
     buttons"

    pressed ifFalse:[
	self toggle
    ]
! !