RButton.st
author claus
Sat, 08 Jan 1994 18:27:56 +0100
changeset 21 9ef599238fea
parent 5 7b4fb1b170e5
child 38 4b9b70b2cc87
permissions -rw-r--r--
*** empty log message ***

"
 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

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

$Header: /cvs/stx/stx/libwidg/Attic/RButton.st,v 1.3 1993-10-13 02:48:52 claus Exp $
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
    ]
! !