RadioButtonController.st
author Claus Gittinger <cg@exept.de>
Thu, 09 Nov 2017 20:09:30 +0100
changeset 6225 0122e4e6c587
parent 6081 a3c3c71df0ef
permissions -rw-r--r--
#FEATURE by cg class: GenericToolbarIconLibrary class added: #hideFilter16x16Icon
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
"
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    12
"{ Package: 'stx:libwidg' }"
128
claus
parents: 126
diff changeset
    13
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    14
"{ NameSpace: Smalltalk }"
2750
94531b6049a3 method category rename
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
    15
104
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    16
ToggleController subclass:#RadioButtonController
582
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    17
	instanceVariableNames:''
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    18
	classVariableNames:''
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    19
	poolDictionaries:''
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    20
	category:'Interface-Support-Controllers'
104
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    21
!
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    22
2750
94531b6049a3 method category rename
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
    23
!RadioButtonController class methodsFor:'documentation'!
128
claus
parents: 126
diff changeset
    24
claus
parents: 126
diff changeset
    25
copyright
claus
parents: 126
diff changeset
    26
"
claus
parents: 126
diff changeset
    27
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents: 126
diff changeset
    28
	      All Rights Reserved
claus
parents: 126
diff changeset
    29
claus
parents: 126
diff changeset
    30
 This software is furnished under a license and may be used
claus
parents: 126
diff changeset
    31
 only in accordance with the terms of that license and with the
claus
parents: 126
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
claus
parents: 126
diff changeset
    33
 be provided or otherwise made available to, or used by, any
claus
parents: 126
diff changeset
    34
 other person.  No title to or ownership of the software is
claus
parents: 126
diff changeset
    35
 hereby transferred.
claus
parents: 126
diff changeset
    36
"
claus
parents: 126
diff changeset
    37
!
claus
parents: 126
diff changeset
    38
claus
parents: 126
diff changeset
    39
documentation
claus
parents: 126
diff changeset
    40
"
claus
parents: 126
diff changeset
    41
    RadioButtonControllers redefine the response to a button-click.
claus
parents: 126
diff changeset
    42
    While toggles (i.e. ToggleControllers) change state with every click,
claus
parents: 126
diff changeset
    43
    radioButtons will only do so for an off-to-on transition.
claus
parents: 126
diff changeset
    44
    They will NEVER turn themselfes off with a click.
claus
parents: 126
diff changeset
    45
    To turn a radioButton off, another button in its buttonGroup must
claus
parents: 126
diff changeset
    46
    be turned on and thereby (via the buttonGroup) turn the first button off.
claus
parents: 126
diff changeset
    47
claus
parents: 126
diff changeset
    48
    You can place both toggles (for 'zero-or-one-on' behavior) or
claus
parents: 126
diff changeset
    49
    radiobuttons (for 'one-on' behavior) into a buttongroup.
582
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    50
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    51
    [author:]
e151eeae2c9a documentation
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
    52
        Claus Gittinger
128
claus
parents: 126
diff changeset
    53
"
claus
parents: 126
diff changeset
    54
! !
claus
parents: 126
diff changeset
    55
2750
94531b6049a3 method category rename
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
    56
!RadioButtonController methodsFor:'initialization & release'!
104
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    57
790
de3424da84aa radio behavior now in general ButtonController
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
    58
initialize
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    59
    <modifier: #super> "must be called if redefined"
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    60
790
de3424da84aa radio behavior now in general ButtonController
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
    61
    super initialize.
de3424da84aa radio behavior now in general ButtonController
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
    62
    isToggle := false.
de3424da84aa radio behavior now in general ButtonController
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
    63
    isRadio := true.
de3424da84aa radio behavior now in general ButtonController
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
    64
    isTriggerOnDown := true.
104
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    65
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    66
    "Created: / 15-07-1996 / 13:43:23 / cg"
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    67
    "Modified: / 08-02-2017 / 00:34:42 / cg"
104
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    68
! !
ca75c90df7a9 Initial revision
claus
parents:
diff changeset
    69
2750
94531b6049a3 method category rename
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
    70
!RadioButtonController class methodsFor:'documentation'!
203
8a38b0b03233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    71
8a38b0b03233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    72
version
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    73
    ^ '$Header$'
203
8a38b0b03233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 200
diff changeset
    74
! !
6081
a3c3c71df0ef #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2750
diff changeset
    75