|
Class: RadioButton
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--Label
|
+--Button
|
+--Toggle
|
+--RadioButton
- Package:
- stx:libwidg
- Category:
- Views-Interactors
- Version:
- rev:
1.66
date: 2024/03/21 15:05:54
- user: matilk
- file: RadioButton.st directory: libwidg
- module: stx stc-classLibrary: libwidg
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
copyrightCOPYRIGHT (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.
defaults
-
activeForm
-
ActiveForm := nil.
self updateStyleCache
-
disabledActiveForm
-
DisabledActiveForm := nil.
self updateStyleCache
-
disabledPassiveForm
-
DisabledPassiveForm := nil.
self updateStyleCache
-
enteredActiveForm
-
EnteredActiveForm := nil.
self updateStyleCache
-
enteredPassiveForm
-
EnteredPassiveForm := nil.
self updateStyleCache
-
motifCheckBotForm
-
-
motifCheckInnerForm
-
-
motifCheckTopForm
-
-
passiveForm
-
PassiveForm := nil.
self updateStyleCache
-
round3DCheckBotForm
-
-
round3DCheckInnerForm
-
-
round3DCheckTopForm
-
fromArray:#[2r00000111 2r11000000
-
roundHalfLightForm
-
fromArray:#[2r00000000 2r00000000
-
roundOffForm
-
DSVColumnView>>updateStyleCache calls us before our style
cache has been initialized
-
roundOffForm_old
-
-
roundOnForm
-
DSVColumnView>>updateStyleCache calls us before our style
cache has been initialized
-
roundOnForm_old
-
-
updateStyleCache
-
self updateStyleCache
image specs
-
radioOffDisabledIcon_vista
-
-
radioOffDisabledIcon_w10
-
-
radioOffDisabledIcon_w95
-
-
radioOffDisabledIcon_xp
-
-
radioOffEnteredIcon_vista
-
-
radioOffEnteredIcon_w10
-
-
radioOffEnteredIcon_w95
-
-
radioOffEnteredIcon_xp
-
-
radioOffIcon_vista
-
-
radioOffIcon_w10
-
-
radioOffIcon_w95
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self radioOffIcon_w95 inspect
ImageEditor openOnClass:self andSelector:#radioOffIcon_w95
Icon flushCachedIcons
|
-
radioOffIcon_xp
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self radioOffIcon_xp inspect
ImageEditor openOnClass:self andSelector:#radioOffIcon_xp
Icon flushCachedIcons
|
-
radioOnDisabledIcon_vista
-
-
radioOnDisabledIcon_w10
-
-
radioOnDisabledIcon_w95
-
-
radioOnDisabledIcon_xp
-
-
radioOnEnteredIcon_vista
-
-
radioOnEnteredIcon_w10
-
-
radioOnEnteredIcon_w95
-
-
radioOnEnteredIcon_xp
-
-
radioOnIcon_vista
-
-
radioOnIcon_w10
-
-
radioOnIcon_w95
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self radioOnIcon_w95 inspect
ImageEditor openOnClass:self andSelector:#radioOnIcon_w95
Icon flushCachedIcons
|
-
radioOnIcon_xp
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self radioOnIcon_xp inspect
ImageEditor openOnClass:self andSelector:#radioOnIcon_xp
Icon flushCachedIcons
|
accessing
-
allViewBackground: something if: condition
-
(comment from inherited method)
no longer ignored here
-
forceRadioButtonStyle
-
force the radioButton to be displayed as round/motif radio button -
even if the styleSheet defaults differently.
(as in IRIS style)
changing state
-
turnOff
-
(comment from inherited method)
turn the button off (if not already off) do NOT perform actions/change notifications
-
turnOn
-
(comment from inherited method)
turn the button on (if not already on) - do NOT perform any action/notification
drawing
-
drawToggleImage
-
drawing of the radio image is done here.
-
drawWin95FocusFrame
-
redefined to draw the focus frame around the string-only
initialization
-
defaultControllerClass
-
-
initStyle
-
setup viewStyle specifics
native widget support
-
nativeWindowType
-
return a symbol describing my native window type
(may be used internally by the device as a native window creation hint,
if the device supports native windows)
private
-
computeLabelOrigin
-
(comment from inherited method)
compute the origin of the form/text.
redefined to move label to the right if there is a lamp.
-
lampImageHeight
-
-
lampImageWidth
-
-
rawLabelSizeOf: aLogo
-
compute the extent needed to hold the label plus the lamp
queries
-
is3D
-
(comment from inherited method)
return true, if the receiver is a 3D style view
See more examples in RadioButtonGroup class>>examples
example1: one on behavior (using RadioButtons)
|top panel b group|
top := StandardSystemView new.
top extent:200@200.
panel := HorizontalPanelView origin:(0.0@0.0) corner:(1.0@1.0) in:top.
group := RadioButtonGroup new.
b := RadioButton label:'am' in:panel.
group add:b.
b := RadioButton label:'fm' in:panel.
group add:b.
b := RadioButton label:'off' in:panel.
group add:b.
b enabled:false.
group value:1.
top open
|
example2: zero or one on behavior (using Toggles)
|top panel b group|
top := StandardSystemView new.
top extent:200@200.
panel := HorizontalPanelView origin:(0.0@0.0) corner:(1.0@1.0) in:top.
group := RadioButtonGroup new.
b := Toggle label:'am' in:panel.
group add:b.
b := Toggle label:'fm' in:panel.
group add:b.
b := Toggle label:'off' in:panel.
group add:b.
group value:1.
top open
|
a selectionInListView and a group displaying the same value:
|top top2 panel b sv group selectionInList|
top := StandardSystemView extent:200@200.
panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:top.
group := RadioButtonGroup new.
selectionInList := SelectionInList new.
selectionInList list:#('am' 'fm' 'off').
selectionInList selectionIndexHolder:group.
b := Toggle label:'am' in:panel.
group add:b.
b := Toggle label:'fm' in:panel.
group add:b.
b := Toggle label:'off' in:panel.
group add:b.
group value:1.
top open.
top2 := StandardSystemView extent:200@200.
sv := SelectionInListView in:top2.
sv model:selectionInList.
sv origin:0.0@0.0 corner:1.0@1.0.
top2 open.
|
|