RButtC.st
changeset 128 06a050529335
parent 126 40228f4fd66b
child 174 d80a6cc3f9b2
equal deleted inserted replaced
127:462396b08e30 128:06a050529335
       
     1 "
       
     2  COPYRIGHT (c) 1995 by Claus Gittinger
       
     3 	      All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
       
    12 
     1 'From Smalltalk/X, Version:2.10.5 on 14-mar-1995 at 11:07:27 am'!
    13 'From Smalltalk/X, Version:2.10.5 on 14-mar-1995 at 11:07:27 am'!
     2 
    14 
     3 ToggleController subclass:#RadioButtonController
    15 ToggleController subclass:#RadioButtonController
     4 	 instanceVariableNames:''
    16 	 instanceVariableNames:''
     5 	 classVariableNames:''
    17 	 classVariableNames:''
     6 	 poolDictionaries:''
    18 	 poolDictionaries:''
     7 	 category:'Interface-Support-Controllers'
    19 	 category:'Interface-Support-Controllers'
     8 !
    20 !
     9 
    21 
       
    22 !RadioButtonController class methodsFor:'documentation'!
       
    23 
       
    24 copyright
       
    25 "
       
    26  COPYRIGHT (c) 1995 by Claus Gittinger
       
    27 	      All Rights Reserved
       
    28 
       
    29  This software is furnished under a license and may be used
       
    30  only in accordance with the terms of that license and with the
       
    31  inclusion of the above copyright notice.   This software may not
       
    32  be provided or otherwise made available to, or used by, any
       
    33  other person.  No title to or ownership of the software is
       
    34  hereby transferred.
       
    35 "
       
    36 !
       
    37 
       
    38 version
       
    39 "
       
    40 $Header: /cvs/stx/stx/libwidg/Attic/RButtC.st,v 1.3 1995-05-17 12:25:53 claus Exp $
       
    41 "
       
    42 !
       
    43 
       
    44 documentation
       
    45 "
       
    46     RadioButtonControllers redefine the response to a button-click.
       
    47     While toggles (i.e. ToggleControllers) change state with every click,
       
    48     radioButtons will only do so for an off-to-on transition.
       
    49     They will NEVER turn themselfes off with a click.
       
    50     To turn a radioButton off, another button in its buttonGroup must
       
    51     be turned on and thereby (via the buttonGroup) turn the first button off.
       
    52 
       
    53     You can place both toggles (for 'zero-or-one-on' behavior) or
       
    54     radiobuttons (for 'one-on' behavior) into a buttongroup.
       
    55 "
       
    56 ! !
       
    57 
    10 !RadioButtonController methodsFor:'event handling'!
    58 !RadioButtonController methodsFor:'event handling'!
    11 
    59 
    12 buttonPress:button x:x y:y
    60 buttonPress:button x:x y:y
    13     "radiobuttons change only off-to-on; turning off is done by other
    61     "radiobuttons change only off-to-on; turning off is done by other
    14      buttons"
    62      buttons."
    15 
    63 
    16     pressed ifFalse:[
    64     pressed ifFalse:[
    17 	view toggle
    65 	view toggle
    18     ]
    66     ]
    19 ! !
    67 ! !