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

Palette.mui

MUIA_Palette_Entries

Function

Supply or read the mutable palette records edited by the object.

Inputs

Initialize and get in the header; this implementation also accepts Set.
Borrowed pointer to writable MUI_Palette_Entry records terminated by
mpe_ID == -1. Default NULL creates an empty list.

Notes

Each record contains an ID, three ULONG color channels and a group
value. The constructor counts to the sentinel without a length limit and
inserts pointers without copying the records. Keep the original records
valid through child-list use; their storage is never freed by Palette.
Get returns the currently stored pointer with TRUE.
The setter only replaces the pointer. It does not recount records,
replace the child List entries, refresh Coloradjust or update the RGB
cache. Callbacks subsequently index the new pointer using the old count,
while List still contains the original record addresses. Replacing with
NULL or a shorter array can invalidate later callbacks; recreating the
Palette is the supported way to change its record set safely. Direct
channel edits to an existing array do not automatically refresh the
editor.

MUIA_Palette_Groupable

Function

Store a grouping flag without enabling grouped palette editing.

Inputs

Initialize and set, BOOL in the header, stored as ULONG. Default zero.
No local getter despite the header get annotation.

Notes

The field is assigned in construction and Set but is not otherwise used.
It adds no group controls, linked edits or mpe_Group processing. Other
getters delegate to Group, so the header get flag does not establish a
readable stored Groupable value.

MUIA_Palette_Names

Function

Supply or read optional row labels for palette entries.

Inputs

Initialize, set and get, borrowed array of terminated string pointers.
Default NULL uses localized numbered labels.

Notes

Provide at least one valid pointer per constructed row. No length or
NULL-entry checks are made by the display hook; a terminating NULL alone
does not replace the per-row requirement. Array and strings remain
caller-owned and must be readable during display. Get returns the stored
array with TRUE.
Set changes the pointer but does not explicitly redraw the list. Labels
are read on later display calls. Names use row order, not mpe_ID or
mpe_Group, and changing them does not rename or reorder records.

MUIC_Palette

Superclass

Group.mui

Description

Edit a caller-owned array of MUI_Palette_Entry records using an owned
Listview and Coloradjust. The group is horizontal with a group frame and
button background. The constructor counts records until mpe_ID equals
MUIV_Palette_Entry_End (-1), inserts their addresses into List and
selects the first entry when any exist.
Entries and optional Names remain borrowed. Color edits write red, green
and blue directly into the selected caller record; there is no private
copy, commit or cancel operation. The source array must be writable and
remain valid while the object uses it. Disposal delegates to Group to
dispose children; it does not free Entries, Names or their strings.
Selecting a valid list index loads all three channels from that array
position into Coloradjust without notifications, updates the instance
RGB cache and performs a further no-notify color synchronization. An
editor channel notification writes all three current editor channels
back into the selected record. The record ID is used only to find the
end marker; list indices, not IDs, select records. mpe_Group is not used
to propagate edits.
Coloradjust defines the editor's channel precision and input behavior.
Editing through its eight-bit sliders can reduce channel precision; the
Palette wrapper does not add a lossless editing guarantee. Child
insertion and notification-registration results are not checked
individually, so partial failures are not comprehensively reported.

Notes

In addition to Palette attributes, the local getter handles
Coloradjust_Red, Green, Blue and RGB. These return the instance cache,
initialized from the first record and refreshed when a list selection is
loaded. The color-edit callback updates Entries but not this cache; the
getters can therefore return stale values after editing. RGB returns a
borrowed pointer to the internal three-ULONG array, valid until disposal
and overwritten on selection changes.
There is no explicit Palette_Entries or Palette-level RGB notification
generated by the color-edit callback. Read the writable Entries array
for the edited values. Normal Group forwarding of caller Set tags and
inherited Notify behavior remain separate from those internal edits.
Names are selected by the List display index stored in array[-1], not by
the entry ID. Supply one valid terminated string per row when Names is
non-NULL. Without Names, the display hook formats a localized numbered
label into a shared 20-byte instance buffer using RawDoFmt without a
bound. The buffer is overwritten on the next display call; the
implementation does not enforce output length.