eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RadioButton':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RadioButton


Inheritance:

   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

Description:


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

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.

Class protocol:

defaults
o  activeForm
ActiveForm := nil.
self updateStyleCache

o  disabledActiveForm
DisabledActiveForm := nil.
self updateStyleCache

o  disabledPassiveForm
DisabledPassiveForm := nil.
self updateStyleCache

o  enteredActiveForm
EnteredActiveForm := nil.
self updateStyleCache

o  enteredPassiveForm
EnteredPassiveForm := nil.
self updateStyleCache

o  motifCheckBotForm

o  motifCheckInnerForm

o  motifCheckTopForm

o  passiveForm
PassiveForm := nil.
self updateStyleCache

o  round3DCheckBotForm

o  round3DCheckInnerForm

o  round3DCheckTopForm
fromArray:#[2r00000111 2r11000000

o  roundHalfLightForm
fromArray:#[2r00000000 2r00000000

o  roundOffForm
DSVColumnView>>updateStyleCache calls us before our style
cache has been initialized

o  roundOffForm_old

o  roundOnForm
DSVColumnView>>updateStyleCache calls us before our style
cache has been initialized

o  roundOnForm_old

o  updateStyleCache
self updateStyleCache

image specs
o  radioOffDisabledIcon_vista

o  radioOffDisabledIcon_w10

o  radioOffDisabledIcon_w95

o  radioOffDisabledIcon_xp

o  radioOffEnteredIcon_vista

o  radioOffEnteredIcon_w10

o  radioOffEnteredIcon_w95

o  radioOffEnteredIcon_xp

o  radioOffIcon_vista

o  radioOffIcon_w10

o  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

o  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

o  radioOnDisabledIcon_vista

o  radioOnDisabledIcon_w10

o  radioOnDisabledIcon_w95

o  radioOnDisabledIcon_xp

o  radioOnEnteredIcon_vista

o  radioOnEnteredIcon_w10

o  radioOnEnteredIcon_w95

o  radioOnEnteredIcon_xp

o  radioOnIcon_vista

o  radioOnIcon_w10

o  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

o  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


Instance protocol:

accessing
o  allViewBackground: something if: condition
(comment from inherited method)
no longer ignored here

o  forceRadioButtonStyle
force the radioButton to be displayed as round/motif radio button -
even if the styleSheet defaults differently.
(as in IRIS style)

changing state
o  turnOff
(comment from inherited method)
turn the button off (if not already off) do NOT perform actions/change notifications

o  turnOn
(comment from inherited method)
turn the button on (if not already on) - do NOT perform any action/notification

drawing
o  drawToggleImage
drawing of the radio image is done here.

o  drawWin95FocusFrame
redefined to draw the focus frame around the string-only

initialization
o  defaultControllerClass

o  initStyle
setup viewStyle specifics

native widget support
o  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
o  computeLabelOrigin
(comment from inherited method)
compute the origin of the form/text.
redefined to move label to the right if there is a lamp.

o  lampImageHeight

o  lampImageWidth

o  rawLabelSizeOf: aLogo
compute the extent needed to hold the label plus the lamp

queries
o  is3D
(comment from inherited method)
return true, if the receiver is a 3D style view


Examples:


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.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 04:23:02 GMT