<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../../aros.css' --->

Radio.mui

MUIA_Radio_Active

Function

Select a radio choice or return its stored zero-based index.

Inputs

Initialize, set and get, LONG. Default zero. Valid indices are zero
through the number of entries minus one. No Next/Prev sentinel values
are implemented.

Notes

Construction replaces invalid indices with zero. Set ignores an invalid
or unchanged index locally. For a valid change it sends NoNotifySet
Selected FALSE to the old child group and TRUE to the new one, then
stores the new index. Group forwarding updates the image and text
without recursively delivering their Selected notifications.
The original Active tag is still passed to Group even when no selection
changes. Notifications can therefore report an invalid or unchanged
requested value; MUIV_TriggerValue is not proof of the current
selection. Read Active to obtain the stored index. Get stores that index
and returns TRUE. Set returns the superclass result and supplies no
separate change/error status.

MUIA_Radio_Entries

Function

Create a radio choice for each supplied label.

Inputs

Initialize only; pointer to a NULL-terminated array of pointers to
terminated strings. Required; no default array, local setter or local
getter.

Notes

The array is read during construction and the Text children copy each
string. After successful construction the caller may release the array
and source strings. Radio owns the child groups; do not dispose them
separately. Replacing Entries on an existing Radio does not rebuild its
choices.
Supply at least one entry and a count representable by the constructor
allocations. An empty array does not produce a useful selected choice,
and zero-size allocation behavior can affect construction. Count
arithmetic and child allocation failures are not fully checked. Return
NULL from construction is not a guarantee that every intermediate
allocation was reclaimed.

MUIC_Radio

Superclass

Group.mui

Description

Display a set of mutually exclusive choices as groups of a radio image
and text label. Each image and label uses immediate input and routes
every Selected notification to the containing Radio's Active setter with
its own index. Clicking the label or image therefore selects the same
choice. The class owns the constructed child groups and an array of
child pointers.
Construction requires Entries. Each Text child copies its label; Radio
does not retain the input array. Initial Active defaults to zero and an
out-of-range value is replaced by zero. Child construction and
notification registration do not have comprehensive individual failure
checks. A NULL Entries argument follows an early disposal/failure path
before superclass construction; provide a valid nonempty array.
Setup delegates first, returns FALSE on superclass failure, then sets
horizontal and vertical Group spacing from the radio-button preferences
and returns TRUE. Dispose frees the pointer array and delegates child
disposal to Group. Serialize setters and child callbacks with disposal;
no additional lifetime or locking mechanism is provided.

Methods

With a nonzero ObjectID, Export writes one LONG containing the current
selection to the supplied Dataspace. Import looks up that ID and sets
Active from the first LONG of the returned record. Both return zero and
ignore operation status; ObjectID zero performs no access. Use a live
Dataspace with a correctly sized LONG record: Import does not check the
stored length. Imported invalid indices follow the ordinary setter
behavior, including notification forwarding.