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

Register.mui

MUIA_Register_Columns

Function

Choose the number of tab columns. Default is the number of titles,
producing one row.

Inputs

Integer initialization value, converted to WORD; no local setter or
getter.

Notes

After WORD conversion, values at or below zero become one. Rows are the
ceiling of title count divided by columns. Values above the title count
are not capped and can leave unused tab positions. The active row
divides tabs above and below the content. This does not set
Group_Columns.

Bugs

Conversion and later spacing/geometry arithmetic are unchecked. Use a
positive representable count appropriate for the title set; an oversized
value is not a reliable range-error request.

MUIA_Register_Frame

Function

Store the requested frame flag and return it through the getter. Default
zero.

Inputs

BOOL; initialize and get. The supplied value is stored without Boolean
normalization.

Notes

In this AROS implementation the stored flag is not consulted by drawing,
layout or setup. FALSE therefore does not suppress the register border.
This attribute differs from Area Frame and Group register-frame
title-child handling. There is no Register setter.

MUIA_Register_Titles

Function

Provide the labels for the content pages, in child order. This attribute
is required at construction.

Inputs

Pointer to STRPTR array; initialize and get. Non-NULL pointer to a
nonempty NULL-terminated array of valid strings.

Notes

The array and strings are borrowed, not freed by Register. The getter
returns the original pointer. Setup parses each label into owned text
objects; Cleanup frees those objects, and a later Setup reads the
original array again. Keep the array and strings alive through disposal.
There is no Register setter or automatic rebuilding after editing
titles.

Bugs

The number of labels is stored in a WORD and is not checked against the
number of children. Missing or empty arrays fail construction, but
unterminated or excessively long arrays are not safely rejected. Setup
does not check parsed-text allocation failure.

MUIC_Register

Superclass

Group.mui

Description

Display labeled tabs for a Group page set. Construction prepends
Group_PageMode TRUE and Background RegisterBack before caller tags;
later caller tags can override these defaults. Supply a nonempty
NULL-terminated Titles array and one content child per title, in
matching order. The implementation does not validate that title and
child counts agree.
Group owns attached children. Register owns its tab-item array and
setup-time parsed text objects; it borrows the title array and strings.
Keep titles valid through disposal, including repeated Setup/Cleanup
cycles. Construction returns NULL on superclass failure, missing/empty
Titles or item allocation failure; disposing the partly constructed
object also disposes adopted children.

Methods

Setup first sets up Group, uses the title font, creates parsed text for
each title, computes tab dimensions and installs a mouse/raw-key
handler. Text allocation failures are not checked: depending on
preferences, later width calculation or Cleanup can dereference NULL.
Cleanup destroys parsed texts, removes the handler, then cleans Group.
Dispose frees the item array then disposes Group; it does not replace
Cleanup.
AskMinMax takes Group constraints, raises width requirements for tabs
and sets MaxHeight to MUI_MAXMAX; it returns TRUE. Layout reads
Group_ActivePage, adjusts inner margins and tab hit boxes, invokes Group
layout and returns TRUE regardless of its result. Show similarly returns
TRUE without propagating superclass failure. Draw invokes Group then
draws tabs for full/update flags; otherwise returns zero. It does not
honor a FALSE Group Draw result as a reason to stop drawing tabs.
The event handler maps Press/Right/Toggle to next page, Left to
previous, WordLeft/LineStart to first and WordRight/LineEnd to last.
Clicking another tab selects its index. Handled changes return Eat,
other events zero, without superclass event delegation. Setters use
Group_Forward FALSE, which still permits notifications.

Notes

Select pages through Group_ActivePage. Keep the index valid for both
children and labels. The constructor clamps only its private tab index,
not Group's stored page; later Layout copies the Group index without
validation. Invalid indices can lead to out-of-bounds old-tab access
during drawing. Child changes do not rebuild the title count or item
array.
Register_Columns controls tab rows; it is unrelated to Group_Columns.
Rows after the active tab row are placed below the content. Geometry and
counts use WORD fields without comprehensive overflow checks. Setup and
layout require a valid connected application, preferences and window.