RButton.st
author claus
Mon, 10 Oct 1994 04:03:47 +0100
changeset 59 450ce95a72a4
parent 38 4b9b70b2cc87
child 77 565b052f5277
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

$Header: /cvs/stx/stx/libwidg/Attic/RButton.st,v 1.5 1994-10-10 03:02:48 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.5 1994-10-10 03:02:48 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'!

XXtoggle
    "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
    ]
! !