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.59 date: 2018/07/28 08:08:29
user: cg
file: RadioButton.st directory: libwidg
module: stx stc-classLibrary: libwidg
Author:
Claus Gittinger

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


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_w95

o  radioOffDisabledIcon_xp

o  radioOffEnteredIcon_vista

o  radioOffEnteredIcon_w95

o  radioOffEnteredIcon_xp

o  radioOffIcon_vista

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_w95

o  radioOnDisabledIcon_xp

o  radioOnEnteredIcon_vista

o  radioOnEnteredIcon_w95

o  radioOnEnteredIcon_xp

o  radioOnIcon_vista

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

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

o  turnOn

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.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 16 Apr 2024 14:48:09 GMT