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